REGISTER XMLSCHEMA command

The REGISTER XMLSCHEMA command registers an XML schema with the XML schema repository (XSR).

Authorization

One of the following authorities:
  • DBADM
  • IMPLICIT_SCHEMA database authority if the SQL schema does not exist
  • CREATEIN privilege if the SQL schema exists

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagramREGISTER XMLSCHEMAschema-URIFROMcontent-URIWITHproperties-URIASrelational-identifierxml-document-subclauseCOMPLETEWITHschema-properties-URIENABLE DECOMPOSITION
xml-document-subclause
Read syntax diagramSkip visual syntax diagram( ADDdocument-URIFROMcontent-URIWITHproperties-URI )

Command parameters

schema-URI
Specifies the URI, as referenced by XML instance documents, of the XML schema being registered.
FROM content-URI
Specifies the URI where the XML schema document is located. Only a local file specified by a file scheme URI is supported.
WITH properties-URI
Specifies the URI of a properties document for the XML schema. Only a local file specified by a file scheme URI is supported.
AS relational-identifier
Specifies a name that can be used to refer to the XML schema being registered. The relational name can be specified as a two-part SQL identifier, consisting of the SQL schema and the XML schema name, having the following format: SQLschema.name. The default relational schema, as defined in the CURRENT SCHEMA special register, is used if no schema is specified. If no name is provided, a unique value is generated.
COMPLETE
Indicates that there are no more XML schema documents to be added. If specified, the schema is validated and marked as usable if no errors are found.
WITH schema-properties-URI
Specifies the URI of a properties document for the XML schema. Only a local file specified by a file scheme URI is supported.
ENABLE DECOMPOSITION
Specifies that this schema is to be used for decomposing XML documents.
ADD document-URI
Specifies the URI of an XML schema document to be added to this schema, as the document would be referenced from another XML document.
FROM content-URI
Specifies the URI where the XML schema document is located. Only a local file specified by a file scheme URI is supported.
WITH properties-URI
Specifies the URI of a properties document for the XML schema. Only a local file specified by a file scheme URI is supported.

Examples

REGISTER XMLSCHEMA 'http://myPOschema/PO.xsd'
FROM 'file:///c:/TEMP/PO.xsd'
WITH 'file:///c:/TEMP/schemaProp.xml'
AS user1.POschema

Usage notes

  • Before an XML schema document can be referenced and be available for validation and annotation, it must first be registered with the XSR. This command performs the first step of the XML schema registration process, by registering the primary XML schema document. The final step of the XML schema registration process requires that the COMPLETE XMLSCHEMA command run successfully for the XML schema. Alternatively, if there are no other XML schema documents to be included, issue the REGISTER XMLSCHEMA command with the COMPLETE keyword to complete registration in one step.
  • When registering an XML schema in the database, a larger application heap (applheapsz) may be required depending on the size of the XML schema. The recommended size is 1024 but larger schemas will require additional memory.