Skip to main content
Close announcements banner

XSD Issues

The XML support includes import capabilities for XML Schema (XSD), WSDL, and DTDs (deprecated). Generally in order to map XML documents you will not need to understand the details of how XSD works as the XSD schemas are translated into a structure which clearly reflects the schema and is consistent with the way other structures are handled.

Here is a discussion of some of the XSD features and how they are translated into structures during the import process.

  • Abstract Types - An abstract type is represented by a generated non-visible enclosing choice element. The members of the choice are all of the possible concrete types that are possible under the given abstract type. In addition, an xsi:type attribute is generated and an emit expression is generated for each branch of the choice check the value of the xsi:type element.

    Generally the members of the choice will be mapped to some members of a choice in the output, so the emit expressions will just be copied from the input and you don't have to do anything special. For more exotic mappings you can simply use the same logic as what is generated in the emit expressions to provide the conditions for selecting members of the choice.

    For the output, a value expression is generated to provide the default value for the xsi:type element to make sure it's correctly populated.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!