Code Generation¶
The test suite is using the cli
with the dataclass
format to generate code from simple examples that cover most of the XML Schema language traits.
The primary goal of this suite is to keep track of the XSD features not yet supported and to monitor changes in the current implementation.
Results
Total tests: 198
Passed: 198
Samples Source
Definitive XML Schema by Priscilla Walmsley (c) 2012 Prentice Hall PTR
- Chapter 01: Schemas: An introduction
- Chapter 02: A quick tour of XML Schema
- Chapter 04: Schema composition
- Example 4-1 Include
- Example 4-1.2 Include
- Example 4-2 Chameleon include
- Example 4-2.2 Chameleon include
- Example 4-3 Import
- Example 4-3.2 Import
- Example 4-5 Multiple imports of the same namespace
- Example 4-5.2 Multiple imports of the same namespace
- Example 4-5.3 Multiple imports of the same namespace
- Example 4-6 Proxy schema to avoid multiple imports
- Example 4-6.2 Proxy schema to avoid multiple imports
- Chapter 06: Element declarations
- Chapter 07: Attribute declarations
- Chapter 08: Simple types
- Example 8-1 Defining and referencing a named simple type
- Example 8-10 Restricting an enumeration
- Example 8-12 Using a union to extend an enumeration
- Example 8-13 Enumerating numeric values
- Example 8-14 Applying the pattern facet
- Example 8-15 Restricting a pattern
- Example 8-17 Simple type assertion
- Example 8-18 Explicit time zone
- Example 8-2 Defining an anonymous simple type
- Example 8-21 Preventing type derivation
- Example 8-23 Using the Saxon preprocess facet
- Example 8-3 Deriving a simple type from a built-in simple type
- Example 8-4 Deriving a simple type from a user-derived simple type
- Example 8-5 Effective definition of MediumDressSizeType
- Example 8-7 Fixed facets
- Example 8-8 Union allowing an empty value
- Example 8-9 Applying the enumeration facet
- Chapter 10: Union and list types
- Example 10-1 Defining a union type
- Example 10-10 Length facet applied to a list
- Example 10-12 Enumeration applied inappropriately to a list type
- Example 10-13 Enumeration applied to the item type of a list
- Example 10-14 Enumeration correctly applied to a list type
- Example 10-15 Pattern applied to a list type
- Example 10-16 Defining a list of a string-based type
- Example 10-18 Defining a list of a union
- Example 10-2 Using the memberTypes attribute
- Example 10-21 An array using markup
- Example 10-3 Combining memberTypes and simpleType
- Example 10-4 Restricting a union
- Example 10-5 A union of a union
- Example 10-7 Defining a list type using an itemType attribute
- Example 10-9 Defining a list type using a simpleType child
- Chapter 11: Built-in simple types
- Chapter 12: Complex types
- Example 12-11 Complex type with empty content
- Example 12-12 Element references
- Example 12-13 Legal duplication of element names
- Example 12-15 A sequence group
- Example 12-18 Enforcing order for better constraints
- Example 12-19 A choice group
- Example 12-2 Named complex type
- Example 12-21 A repeating choice group
- Example 12-23 Multiple nested groups
- Example 12-24 An all group
- Example 12-27 Complex type with a named model group reference
- Example 12-29 Deterministic content model
- Example 12-3 Anonymous complex type
- Example 12-30 Local attribute declaration
- Example 12-31 Attribute reference
- Example 12-32 Complex type with attribute group reference
- Example 12-33 Using an element wildcard
- Example 12-35 Complex type with element wildcard
- Example 12-37 Negative wildcards
- Example 12-40 Defining an interleaved open content model
- Example 12-42 Defining a suffix open content model
- Example 12-44 Defining a default open content model
- Example 12-46 Overriding a default open content model
- Example 12-47 Complex type with attribute wildcard
- Example 12-5 Complex type with simple content
- Example 12-7 Complex type with element-only content
- Example 12-9 Complex type with mixed content
- Chapter 13: Deriving complex types
- Example 13-1 Simple content extension
- Example 13-10 Attribute extension
- Example 13-11 Attribute wildcard extension
- Example 13-12 Effective attribute wildcard
- Example 13-13 Simple content restriction
- Example 13-14 Complex content restriction
- Example 13-2 Complex content extension
- Example 13-26 Restricting open content
- Example 13-26.2 Restricting open content
- Example 13-26.3 Restricting open content
- Example 13-27 Mixed content restriction
- Example 13-28 Mixed content restricted to simple content
- Example 13-29 Empty content restriction
- Example 13-3 Effective content model of ShirtType
- Example 13-30 Legal restrictions of attributes
- Example 13-32 Restricting an attribute wildcard
- Example 13-33 Replacing an attribute wildcard with attributes
- Example 13-34 Restricting a type from another namespace with global declarations
- Example 13-34.2 Restricting a type from another namespace with global declarations
- Example 13-35 Using targetNamespace on element and attribute declarations
- Example 13-35.2 Using targetNamespace on element and attribute declarations
- Example 13-36 A derived type
- Example 13-38 Preventing derivation
- Example 13-39 Preventing substitution of derived types
- Example 13-4 choice group extension
- Example 13-41 An abstract type
- Example 13-5 all group extension
- Example 13-6 Effective content model of ShirtType with all groups combined
- Example 13-7 Extending open content
- Example 13-8 Mixed content extension
- Example 13-9 Empty content extension
- Chapter 15: Named groups
- Example 15-1 Named model group with local element declarations
- Example 15-10 Attribute group with a wildcard
- Example 15-11 Referencing an attribute group from a complex type definition
- Example 15-12 Equivalent complex type without an attribute group
- Example 15-14 Attribute group referencing an attribute group
- Example 15-15 Default attribute group
- Example 15-16 Named groups with a target namespace
- Example 15-17 Named groups across namespaces
- Example 15-17.2 Named groups across namespaces
- Example 15-18 Reusing content model fragments through derivation
- Example 15-2 Named model group with element references
- Example 15-4 Equivalent content model without a named model group reference
- Example 15-5 Group reference at the top level of the content model
- Example 15-6 Group with an all model group
- Example 15-7 Group reference from a group
- Example 15-8 Attribute group with local attribute declarations
- Example 15-9 Attribute group with attribute references
- Chapter 16: Substitution groups
- Example 16-1 The head of a substitution group
- Example 16-10 Using block to prevent substitution group use
- Example 16-2 Members of a substitution group
- Example 16-4 Substitution group with simple types
- Example 16-5 A member of two substitution groups
- Example 16-6 Using a choice group
- Example 16-7 Defining derived types
- Example 16-9 Using final to control substitution group declaration
- Chapter 17: Identity constraints
- Chapter 18: Redefining and overriding schema components
- Example 18-1 A simple redefinition
- Example 18-1.2 A simple redefinition
- Example 18-10 Overriding a complex type
- Example 18-10.2 Overriding a complex type
- Example 18-11 Overriding element and attribute declarations
- Example 18-11.2 Overriding element and attribute declarations
- Example 18-12 Overriding named groups
- Example 18-12.2 Overriding named groups
- Example 18-13 Risks of overriding types
- Example 18-13.2 Risks of overriding types
- Example 18-2 Redefining a simple type
- Example 18-2.2 Redefining a simple type
- Example 18-3 Redefining a complex type
- Example 18-3.2 Redefining a complex type
- Example 18-4 Redefining a named model group as a subset
- Example 18-4.2 Redefining a named model group as a subset
- Example 18-5 Redefining a named model group as a superset
- Example 18-5.2 Redefining a named model group as a superset
- Example 18-6 Redefining an attribute group as a subset
- Example 18-6.2 Redefining an attribute group as a subset
- Example 18-7 Redefining an attribute group as a superset
- Example 18-7.2 Redefining an attribute group as a superset
- Example 18-8 A simple override
- Example 18-8.2 A simple override
- Example 18-9 Overriding a simple type
- Example 18-9.2 Overriding a simple type
- Chapter 21: Schema design and documentation
- Example 21-1 Schema for Russian Doll approach
- Example 21-10 Different namespaces in a schema
- Example 21-10.2 Different namespaces in a schema
- Example 21-10.3 Different namespaces in a schema
- Example 21-13 Chameleon namespaces in a schema
- Example 21-13.2 Chameleon namespaces in a schema
- Example 21-13.3 Chameleon namespaces in a schema
- Example 21-16 Schema for qualified local element names
- Example 21-16.2 Schema for qualified local element names
- Example 21-18 Documentation
- Example 21-19 ISO 11179-based type definition
- Example 21-2 Schema for Salami Slice approach
- Example 21-20 Code documentation
- Example 21-21 Section identifiers
- Example 21-22 Application information
- Example 21-3 Schema for Venetian Blind approach
- Example 21-4 Schema for Garden of Eden approach
- Example 21-8 Same namespace in a schema
- Example 21-8.2 Same namespace in a schema
- Example 21-8.3 Same namespace in a schema
- Chapter 22: Extensibility and reuse