XML Schema 1.1

Oxygen XML Editor offers full support for XML Schema 1.1, including:

  • XML Documents Validation and Content Completion Based on XML Schema 1.1.
  • XML Schema 1.1 Validation and Content Completion.
  • Editing XML Schema 1.1 files in the Schema Design mode.
  • The Flatten Schema action.
  • Resource Hierarchy/Dependencies and Refactoring Actions.
  • Master Files.
  • Generating Documentation for XML Schema 1.1.
  • Support for generating XML instances based on XML Schema.
  • Support for validating XML documents with an NVDL schema that contains an XML Schema 1.1 validation step.

    Note

    To enable XML Schema 1.1 validation in NVDL, you need to pass the following option to the validation engine to specify the schema version: http://www.thaiopensource.com/validate/xsd-version (the possible values are 1.0 or 1.1.

    Tip

    To enable the full XPath expression in assertions and type alternatives, you need to set the http://www.thaiopensource.com/validate/full-xpath option.

XML Schema 1.1 is a superset of XML Schema 1.0, that offers lots of new powerful capabilities.

XML Schema 1.1

The significant new features in XSD 1.1 are:

  • Assertions - Support to define assertions against the document content using XPath 2.0 expressions (an idea borrowed from Schematron).
  • Conditional type assignment - The ability to select the type of schema an element is validated against, based on the values of the attribute of the element.
  • Open content - Content models can use the openContent element to specify content models with open content. These content models allow elements not explicitly mentioned in the content model to appear in the document instance. It is as if wildcards were automatically inserted at appropriate points within the content model. A default may be set that causes all content models to be open unless specified otherwise.

To see the complete list with changes since version 1.0, go to http://www.w3.org/TR/xmlschema11-1/#ch_specs.

XML Schema 1.1 is intended to be mostly compatible with XML Schema 1.0 and to have approximately the same scope. It also addresses bug fixes and brings improvements that are consistent with the constraints on scope and compatibility.

Note

An XML document conforming to a 1.0 schema can be validated using a 1.1 validator, but an XML document conforming to a 1.1 schema may not validate using a 1.0 validator.
If you are constrained to use XML Schema 1.0 (for example, if you develop schemas for a server that uses an XML Schema 1.0 validator that cannot be updated), change the default XML Schema version to 1.0. If you keep the default XML Schema version set to 1.1, the Content Completion Assistant presents XML Schema 1.1 elements that you can insert accidentally in an 1.0 XML Schema. So even if you make a document invalid conforming with XML Schema 1.0, the validation process does not signal any issues.

To change the default XML Schema version, open the Preferences dialog box (OptionsPreferences) and go to XML XML Parser XML Schema.

To watch our video demonstration about the XML Schema 1.1 support, go to https://www.oxygenxml.com/demo/XML_Schema_11.html.

Was this helpful?