Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Schemas

Referencing XDR Schemas in XML Documents

To reference an XML-Data Reduced (XDR) schema from an XML document, include a schema namespace declaration, as in the following XML document.

Example

The following example shows an XML document that references an XDR schema, yourschema.xml.

<book xmlns="x-schema:yourschema.xml">
  <title>Presenting XML</title>
  <author>Richard Light</author>
</book>

In MSXML 2.0 and later, a schema can be included inline within the document that references it. The pound sign (#) before the schema name indicates that the schema is inline.

Example

The following example shows an XML document that references an inline XDR schema.

<root xmlns:data="x-schema:#inLineSchema">
   <Schema name ="inLineSchema"
           xmlns="urn:schemas-microsoft-com:xml-data">
   <ElementType name="myelement"/>
   </Schema>
   <data:myelement>inline example</data:myelement>
</root>

See Also

Using Inline XDR Schemas