Start of change

Command line processor ADD XMLSCHEMA DOCUMENT command

The command line processor ADD XMLSCHEMA DOCUMENT command adds one or more XML schema documents to an existing but incomplete XML schema.

>>-ADD XMLSCHEMA DOCUMENT--TO--relational-identifier------------>

   .----------------------------------------------------------------------.   
   V                                                                      |   
>----ADD--schemaLocation-URI--FROM--content-URI--+----------------------+-+-->
                                                 '-WITH--properties-URI-'     

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

TO relational-identifier
Specifies the relational name of a registered, but incomplete, XML schema to which additional schema documents are to be added.

The schema of the relational identifier must be SYSXSR. If you specify a qualified name, the qualifier must be SYSXSR, such as, SYSXSR.MYSCHEMA. If you specify an unqualified name, you need to execute the SQL statement SET SCHEMA="SYSXSR" before you execute the command. A name that is enclosed in quotation marks, such as "SYSXSR.MYSCHEMA," is considered an unqualified name. Qualifiers or schema names that are enclosed in quotation marks are not folded to uppercase. Qualifiers or schema names that are not enclosed in quotation marks are folded to uppercase.

ADD schemaLocation-URI
Specifies the schema location URI of an XML schema document that is to be added to this schema, as the document is likely to be referenced from another XML document.
FROM content-URI
Specifies the URI where the actual content of an XML schema document is located. The command line processor supports only file URIs, which begin with file://.
WITH properties-URI
Specifies that the URI of a properties document is to be associated with a schema document. The command line processor supports only file URIs, which begin with file://.
COMPLETE
Indicates that no more XML schema documents need to be associated with this XML schema, other than those that are indicated in this ADD XML SCHEMA DOCUMENT command. Validation of the schema is to be performed, and, if no errors are found, the schema is to be marked as usable. Until XML schema registration is completed, the schema is not visible to or usable in other SQL or XML commands.
WITH schema-properties-URI
Specifies the URI of a properties document to be associated with this XML schema. The command line processor supports only file URIs, which begin with file://. A schema properties document can be specified only when the XML schema is also being completed.
ENABLE DECOMPOSITION
Indicates that this schema is to be used for the purpose of decomposing XML documents. This option can be specified only when the XML schema is also being completed.

Examples

Example: Adding documents to an XML schema and completing schema registration
An XML schema that is referred to by the relational name JOHNDOE.PRODSCHEMA1 already is registered. Two more documents need to be added to the list of schema documents associated with the schema. The first document is http:// mycompany.com/xml/schema/order.xsd, which is stored locally in /u/temp. The second document is http:// othercompany.com/external/po.xsd, which is also stored locally in /u/temp. Neither document has an associated properties file, and you are certain that no other documents are referenced by the schema. Issue these commands to add the documents and complete registration:
ADD XMLSCHEMA DOCUMENT TO JOHNDOE.PRODSCHEMA1
ADD http://mycompany.com/xml/schema/order.xsd 
FROM file:///u/temp/order.xsd
ADD http://othercompany.com/external/po.xsd 
FROM file:///u/temp/po.xsd
COMPLETE
Example: Adding documents to an XML schema without completing schema registration
An XML schema that is referred to by the relational name JOHNDOE.TEST is registered, and you need to add a single document without completing the registration. The schema document is http://johndoe.com/test/test3.xsd and it is stored locally in /usr/jdoe/test/test3.xsd. Issue this command to add the document:
ADD XMLSCHEMA DOCUMENT TO JOHNDOE.TEST 
ADD http://johndoe.com/test/test3.xsd
FROM file:///usr/jdoe/test/test3.xsd
End of change