The transformation of XML-Choice loses information

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major
    • None
    • Affects Version/s: cs01
    • Component/s: Core
    • None
    • Hide

      TC agreed to accept the misalignments between the different syntaxes

      Show
      TC agreed to accept the misalignments between the different syntaxes

      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.

            Assignee:
            Andreas Kuehne (Inactive)
            Reporter:
            Andreas Kuehne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: