OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dss-x message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (DSSX-56) The transformation of XML-Choice loses information


    [ https://issues.oasis-open.org/browse/DSSX-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=74740#comment-74740 ] 

Andreas Kuehne commented on DSSX-56:
------------------------------------

The way to express restriction on an object differ significantly between XML and JSON schema. The approach to have a separate dimemnsion of elements in the 'attribute' space in XML not available in JSON makes it even more complex. In the case of the SignatureObjectType it is easy to define a XML choice to apply the either/or sematic for Base64Signature and SignaturePtr. The expected presence of SchemaRefs and WhichDoc is handle in a completely separate manner. In JSON the restriction apply on all four elemnts. So it is tricky to define a choice for Base64Signature and SignaturePtr without introducing a new object.

The general approach taken at AOSIS DSS-X core 2.0 is to defined the semantic in the semantic section and apply a 'best fit' scheme to reflect the restictions in the different schema flavours. It is not intended to define distinct object models for different schemes.

I ould not recommend to change the current schemes. Maybe ist is neccessary to make it more obvious that the semantic requirements apply to the different syntaxes, even if there is no exact way to express it.

> The transformation of XML-Choice loses information
> --------------------------------------------------
>
>                 Key: DSSX-56
>                 URL: https://issues.oasis-open.org/browse/DSSX-56
>             Project: OASIS Digital Signature Services eXtended (DSS-X) TC
>          Issue Type: Improvement
>            Reporter: Andreas Kuehne
>            Assignee: Andreas Kuehne
>            Priority: Major
>
> Received thru the DSS-X public comments list from Neil Crossley on the 2019-08-23:
> The transformation of XML-Choice loses information
> In the XML-Schema, SignatureObjectType consists of a compulsory XML-Choice (elements Base64Signature and SignaturePtr) und two optional elements (SchemaRefs and WhichDoc). In the JSON-Schema, dss2-SignatureObjectType declares four properties and otherwise only requires the existance of at least one property. That means a JSON object with only 'schemaRefs' or 'whichDoc' will satisfy this definition, which does not correspond to the XML-schema. This problem does not appear where the XML-Choice is the sole child element of a complex type, such as UseVerificationTimeType, AdditionalKeyInfoType, KeySelectorType. The JSON-definition of the following types containing choices are also transformed with information loss:
>  SignaturePlacementType, Base64DataType.
> I can imagine that one solution would be to introduce a dedicated type that only contains the respective choice, and to use it.



--
This message was sent by Atlassian JIRA
(v7.7.2#77003)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]