Accelerating the delivery of network services

MARBEN XSD Tools for C Version 1.1 enhancements

This section presents the new services and the improvements added to the XSD Tools for C v1.1 release with regards to the v1.0 release.

This v1.1 minor release brings several enhancements and bug fixes which are listed in the following sections.

The MARBEN XSD Tools for C v2.0 (coming soon) will support Extended XER (the ability to encode and decode XML values conformant to the XML schema in input of the XSD Compiler - see amendment 1 to [X.693]). The v2.0 XSD Compiler will generate Extended XER encoding instructions in the ASN.1 output and the v2.0 XSD Runtime will encompass an Extended XER encoder/decoder.
  • Multiple occurrence particles mapping

    This 1.1 version corrects the mapping of some cases of multiple occurrence particles.

    The 1.0 version maps incorrectly some cases of multiple occurrence particles to ASN.1 SEQUENCE OF type instead of mapping them to ASN.1 SEQUENCE OF named type.

    Example:
     <xsd:complexType name="T">
      <xsd:sequence>
       <xsd:element name="ALPHA" type="xsd:int" maxOccurs="3"/>
      </xsd:sequence>
     </xsd:complexType>

    v1.0 ASN.1 mapping:
      T ::= SEQUENCE {
        aLPHA-list SEQUENCE (SIZE (1..3)) OF
        Int
      }

    v1.1 ASN.1 mapping:
      T ::= SEQUENCE {
        aLPHA-list SEQUENCE (SIZE (1..3)) OF
        aLPHA Int
      }

    This correction impacts the ASN.1 output (-asn1 compiler option).
    This correction impacts the XER encoding (-xer and -cxer compiler options) by changing the tag of the elements.
    This correction does not impact the C API and the other encoding rules.

  • Sequence Model Group mapping

    This 1.1 version corrects the mapping of a model group sequence which is a particle of another model group sequence.

    In the 1.0 version, a model group sequence which is a particle of another model group sequence is mapped incorrectly to an ASN.1 sequence type and its particles are mapped to named types of this sequence.

    The 1.1 version maps only the particles of the inner sequence model group, if it is not related to a model group definition and if its minOccurs and maxOccurs attributes are both one.

    Example:
     <xsd:group name="MyGroup">
      <xsd:sequence>
       <xsd:element name="elem1" type="xsd:string"/>
       <xsd:element name="elem2" type="xsd:integer"/>
       <xsd:sequence>
        <xsd:element name="elem3" type="xsd:string"/>
        <xsd:element name="elem4" type="xsd:integer"/>
       </xsd:sequence>
      </xsd:sequence/>
     </xsd:group>

    v1.0 ASN.1 mapping:
      MyGroup ::= SEQUENCE {
        elem1 String,
        elem2 Integer,
        sequence SEQUENCE {
          elem3 String,
          elem4 Integer
        }
      }

    v1.1 ASN.1 mapping:
      MyGroup ::= SEQUENCE {
        elem1 String,
        elem2 Integer,
        elem3 String,
        elem4 Integer
      }

    This correction impacts the ASN.1 output, the C API and all encoding rules.

  • Attribute use mapping

    This 1.1 version corrects the mapping of prohibited attributes (use="prohibited") to follow strictly the [W3C-XSD] recommendation.

    Example:
     <xsd:attributeGroup name="AG1">
      <xsd:attribute name="a1" type="xsd:string"/>
      <xsd:attribute name="a2" type="xsd:string"/>
      <xsd:attribute name="a3" type="xsd:decimal"/>
     </xsd:attributeGroup>

     <xsd:attributeGroup name="AG2">
      <xsd:attribute name="a1" use="prohibited"/>
      <xsd:attribute name="a3" type="xsd:integer"/>
     </xsd:attributeGroup>

     <xsd:complexType name="MyComplexType-17">
      <xsd:attribute name="a4" type="xsd:boolean"/>
      <xsd:attribute name="a5" type="xsd:boolean"/>
      <xsd:attributeGroup ref="AG1"/>
     </xsd:complexType>

     <xsd:complexType name="MyComplexType-18">
      <xsd:complexContent>
       <xsd:restriction base="MyComplexType-17">
        <xsd:attributeGroup ref="AG2"/>
        <xsd:attribute name="a4" use="prohibited"/>
       </xsd:restriction>
      </xsd:complexContent>
     </xsd:complexType>

    v1.0 ASN.1 mapping:
      MyComplexType-18 ::= SEQUENCE {
        a2 String OPTIONAL,
        a3 Integer OPTIONAL,
        a5 Boolean OPTIONAL
      }

    v1.1 ASN.1 mapping:
      MyComplexType-18 ::= SEQUENCE {
        a1 String OPTIONAL,
        a2 String OPTIONAL,
        a3 Integer OPTIONAL,
        a5 Boolean OPTIONAL
      }

    This correction impacts the ASN.1 output, the C API and all encoding rules.

  • Wildcard attributes mapping

    This 1.1 version corrects the mapping of wildcard attributes (xsd:anyAttribute).

    The 1.0 version takes into account a wildcard attribute only when it is directly contained in a complex type. This means that, for a complex type which has an Attribute Group containing a Wildcard attribute in its children, if the complex type has no Wildcard Attribute, no field is generated in the ASN.1 type corresponding to the complex type to represent this Wildcard Attribute.
    This 1.1 version generates a field named attr.

    Example:
     <xsd:attributeGroup name="AnyAttributeGroup">
      <xsd:anyAttribute namespace="##targetNamespace"/>
     </xsd:attributeGroup>

     <xsd:complexType name="AnyAttribute-7">
      <xsd:sequence/>
      <xsd:attributeGroup ref="AnyAttributeGroup"/>
     </xsd:complexType>

    v1.0 ASN.1 mapping:
      AnyAttribute-7 ::= SEQUENCE {
      }

    v1.1 ASN.1 mapping:
      AnyAttribute-7 ::= SEQUENCE {
        attr SEQUENCE OF String
      }

    This correction impacts the ASN.1 output, the C API and all encoding rules.

  • Redefine mapping

    This 1.1 version improves the support of REDEFINE (xsd:redefine).
    The 1.0 version fails on the redefinition of model groups and attribute groups.
    The 1.1 version processes correctly the redefinition of model groups and attribute groups.

    This correction impacts the ASN.1 output, the C API and all encoding rules.