Scope
- The XML Editor can be used to validate XML documents against an XSD schema.
- Additional functionality is available with XSD schemas that stick to the following prerequisites.
Capabilities
Root element detection
In order to make the XML Editor detect the root element of a schema add a the comment <!-- root element -->
just before the root element of the XSD schema.
Annotations for documentation
- XSD schema files can include the documentation of their elements that is displayed by the XML Editor.
- Provide
<xs:annotation>
elements for documentation.- Use a namespace that allows XHTML elements.
- Restrict the use of XHTML elements to a small subset such as
<p>, <br>, <ul>, <li>, <strong>
etc.
Reference handling
- References of elements of an XML document to other elements in the same document are supported by the XML Editor in a way that such references can be displayed as lists from which the user selects the reference entry.
- The referenced element contains an
<xs:key>
element with a selector and a field reference to an element or attribute. The value of this element or attribute will be displayed as a list by the XML Editor. - The referencing element contains an
<xs:keyref>
element with arefer
attribute that points to the<xs:key name="...">
attribute of the referenced element.
Sample for referenced XSD schema element attribute
<xs:key name="SFTPFragmentKey"> <xs:selector xpath=".//SFTPFragment"/> <xs:field xpath="@name"/> </xs:key>
Sample for referencing XSD schema element
<xs:keyref name="SFTPFragmentKeyRef" refer="SFTPFragmentKey"> <xs:selector xpath=".//SFTPFragmentRef"/> <xs:field xpath="@ref"/> </xs:keyref>