XML Snapshot Namespaces

The <SnapshotRoot> element in the XML snapshot defines the snapshot namespaces and associates them with the xsd, xsi, and default prefixes.

<SnapshotRoot xmlns="https://schemas.microsoft.com/2002/print/gdl/1.0"
    xmlns:xsd="https://www.w3.org/2001/XMLSchema"
    xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">

The following code example shows the <schema> element's start tag in the XSD schema that is generated by the GDL parser.

<schema
    xmlns="https://www.w3.org/2001/XMLSchema"
    xmlns:gdl="https://schemas.microsoft.com/2002/print/gdl/1.0"
    targetNamespace="https://schemas.microsoft.com/2002/print/gdl/1.0"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">

These definitions minimize the need to use explicit namespace prefixes in the schema and snapshot. The typical user does not need to worry about the implications of these definitions. You need to be aware of these namespace conventions only if you choose to use *DataType: XSD_DEFINED. For template authors, the data type definition that is supplied by using the *XSDTypeDefinition directive should follow the namespaces and defaults that are defined in the <schema> element. The instance data for these XSD_DEFINED data types needs to follow the namespaces that are defined in <SnapshotRoot>.