Altova RaptorXML+XBRL Server 2024

Schema Location Hints

Home Prev Top Next

Instance documents can use hints to indicate the schema location. Two attributes are used for hints:

 

xsi:schemaLocation for schema documents with target namespaces. The attribute's value is a pair of items, the first of which is a namespace, the second is a URL that locates a schema document. The namespace name must match the target namespace of the schema document.
<document xmlns="https://www.altova.com/schemas/test03" 

                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

                 xsi:schemaLocation="https://www.altova.com/schemas/test03 Test.xsd">
 

xsi:noNamespaceSchemaLocation for schema documents without target namespaces. The attribute's value is the schema document's URL. The referenced schema document must have no target namespace.
<document xmlns="https://www.altova.com/schemas/test03" 

                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

                 xsi:noNamespaceSchemaLocation="Test.xsd">

 

The --schemalocation-hints option specifies how these two attributes are to be used as hints, especially how the schemaLocation attribute information is to be handled (see the option's description above). Note that RaptorXML+XBRL Server considers the namespace part of the xsi:noNamespaceSchemaLocation value to be the empty string.

 

Schema location hints can also be given in an import statement of an XML Schema document.

 

<import namespace="someNS" schemaLocation="someURL">

 

In the import statement, too, hints can be given via a namespace that can be mapped to a schema in a catalog file, or directly as a URL in the schemaLocation attribute. The --schema-imports option (for XBRL and XSD/XML) specifies how the schema location is to be selected.

 

© 2017-2023 Altova GmbH