DB2 Version 9.7 for Linux, UNIX, and Windows

REGISTER XMLSCHEMA command

Registers an XML schema with the XML schema repository (XSR).

Authorization

One of the following:
  • 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 diagram
>>-REGISTER XMLSCHEMA--schema-URI--FROM--content-URI------------>

>--+----------------------+--+---------------------------+------>
   '-WITH--properties-URI-'  '-AS--relational-identifier-'   

>--+----------------------------+------------------------------->
   '-| xml-document-subclause |-'   

>--+---------------------------------------------------------------------+-><
   '-COMPLETE--+-----------------------------+--+----------------------+-'   
               '-WITH--schema-properties-URI-'  '-ENABLE DECOMPOSITION-'     

xml-document-subclause

      .----------------------------------------------------------------.      
      V                                                                |      
|--(----ADD--document-URI--FROM--content-URI--+----------------------+-+--)--|
                                              '-WITH--properties-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