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
Using the minVersion
and maxVersion
Attributes to
Set the XML Schema Version
Versioning Attributes | XML Schema Version |
---|---|
minVersion = "1.0" maxVerion = "1.1"
|
1.0 |
minVersion = "1.1"
|
1.1 |
minVersion = "1.0" maxVerion = 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
andmaxVersion
attributes on theschema
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 theschema
element and gives it the value "1.1". Also, removes themaxVersion
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
andmaxVersion
attributes from theschema
element. The default schema version, defined in the XML Schema preferences page, is used.
Note
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.