Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This preserves the fact that the DFDL schema is still an XML logical schema, while still giving the schema-declaration order a meaning for a mixture of attribute and element children. The schema declaration order would be the order that the elements/attributes appear in, in the model group of the complex type.

Some caveats:

  • The QName/NCName given for the dfdl:attribute="QName" must match an attribute, attribute group, attribute ref, or attribute group ref of that element.
  • A sequence with dfdl:attribute property cannot be a child of an XSD choice. It can only be the direct child of the sequence group that is the model group of a complex type.
  • DPath expressions need the "@" notation to name attributes.
  • DPath expressions would not allow indexing to retrieve attribute values e.g., ../@attr1[1] would be an SDE.
  • There is no need to allow simple content with attributes. Only empty content with attributes or element-only content with attributes need be supported.
  • Escaping - since attribute values are surrounded with quotation marks (single or double) in XML, those must be escaped if they appear in the content of the attribute value.

If an element has empty content and only attributes, then the need for sequences with the dfdl:attribute property is moot, and the attributes in their order of declaration will suffice to define the representation of the element type. So for small "tuple" like XML elements which have only attributes as children the schema remains simple and uncluttered.

An attribute can have dfdl:inputValueCalc, or dfdl:outputValueCalc, just like elements. An attribute can also