Edit online

Setting the XML Schema Version

Oxygen XML Editor lets you set the version of the XML Schema you are editing either in the XML Schema preferences page, or through the versioning attributes. If you want to use the versioning attributes, set the minVersion and maxVersion attributes, from the http://www.w3.org/2007/XMLSchema-versioning namespace, on the schema root element.
Note: The versioning attributes take priority over the XML Schema version defined in the preferences page.
Table 1. Using the minVersion and maxVersion Attributes to Set the XML Schema Version
Versioning Attributes XML Schema Version
minVersion = "1.0" maxVersion = "1.1" 1.0
minVersion = "1.1" 1.1
minVersion = "1.0" maxVersion = greater than "1.1" The XML Schema version defined in the XML Schema preferences page
Not set in the XML Schema document The XML Schema version defined in the XML Schema preferences page
To change the XML Schema version of the current document, use the Change XML Schema version action from the contextual menu. This is available both in the Text mode, and in the Design mode and opens the Change XML Schema version dialog box. The following options are available:
  • XML Schema 1.0 - Inserts the minVersion and maxVersion attributes on the schema element and gives them the values "1.0" and "1.1" respectively. Also, the namespace declaration (xmlns:vc=http://www.w3.org/2007/XMLSchema-versioning) is inserted automatically if it does not exist.
  • XML Schema 1.1 - Inserts the minVersion attribute on the schema element and gives it the value "1.1". Also, removes the maxVersion attribute if it exists and adds the versioning namespace (xmlns:vc=http://www.w3.org/2007/XMLSchema-versioning) if it is not declared.
  • Default XML Schema version - Removes the minVersion and maxVersion attributes from the schema element. The default schema version, defined in the XML Schema preferences page, is used.
Note: The Change XML Schema version action is also available in the informative panel presented at the top of the edited XML Schema. If you close this panel, it will no longer appear until you restore Oxygen XML Editor to its default options.

Oxygen XML Editor automatically uses the version set through the versioning attributes, or the default version if the versioning attributes are not declared, when proposing content completion elements and validating an XML Schema. Also, the XML instance validation against an XML Schema is aware of the versioning attributes defined in the XML Schema.

When you generate sample XML files from an XML Schema, Oxygen XML Editor takes into account the minVersion and maxVersion attributes defined in the XML Schema.