Altova XMLSpy 2022 Enterprise Edition


The Schema Design | Schema Settings command is enabled in Schema View and lets you define global settings for the active schema. These settings are the attributes of the xs:schema element.


The settings defined in the Schema Settings dialog above (when XSD mode is set to 1.1) will create the following xs:schema element.


<xs:schema xmlns=""



Note:What's in the Schema Settings dialog will differ according to the active XSD mode. When XSD 1.0 is the active mode, XSD 1.1 attributes are not present in the dialog.        


The defaultAttributes and xpathDefaultNamespace attributes are XML Schema 1.1 features and will be available only in XSD 1.1 mode. The other attributes are available in both XSD 1.0 and XSD 1.1.



The version attribute

The version attribute is the document version. It is not the XSD version of the document.



The defaultAttributes attribute

The defaultAttributes attribute enables you to select an attribute group as the default attribute group of all complex types in the schema. The default attribute group is displayed in the content model of these complex types. In the screenshot below, the Contact attribute group is the default attribute group (also see screenshot above, where this has been set), and is automatically available on the group element. To disable the attribute group, set the complex type's defaultAttributesApply to false. You can do this via the defAttrs property in the Details entry helper of the complex type (see screenshot below).




The xpathDefaultNamespace attribute

The xpathDefaultNamespace attribute sets the default namespace for elements in XPath expressions used in the schema. If set in the Schema Settings dialog, the attribute is applied to the top-level xs:schema element. So the scope of the declaration will be the entire document. You can override the declaration on xs:schema with declarations on elements where the attribute is allowed:


xs:assert and xs:assertion


xs:selector and xs:field (in identity constraints)


You can change the XPath default namespace in the Details entry helper of the elements listed above.


The xpathDefaultNamespace attribute can have one of three allowed values:


##targetNamespace: The XPath default namespace will be the same as the target namespace of the schema

##defaultNamespace: The XPath default namespace will be the same as the default namespace of the schema

##local: There is no XPath default namespace


If no XPath default namespace is declared in the document, unprefixed elements in XPath expressions will be in no namespace. The XPath default namespace declaration does not apply to attributes.


© 2016-2022 Altova GmbH