Registers an XML object in the database catalogs. Supported objects are DTDs and external entities.
Database
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE copyright [
<!ELEMENT copyright (#PCDATA)>
]>
<copyright>c</copyright>
Before this document
can be successfully inserted into an XML column, the external entity
needs to be registered. The following command registers an entity
where the entity content is stored locally in C:\TEMP:
REGISTER XSROBJECT 'http://www.xmlwriter.net/copyright.xml'
FROM 'c:\temp\copyright.xml' EXTERNAL ENTITY
<!--inform the XML processor
that an external DTD is referenced-->
<?xml version="1.0" standalone="no" ?>
<!--define the location of the
external DTD using a relative URL address-->
<!DOCTYPE document SYSTEM "http://www.xmlwriter.net/subjects.dtd">
<document>
<title>Subjects available in Mechanical Engineering.</title>
<subjectID>2.303</subjectID>
<subjectname>Fluid Mechanics</subjectname>
...
Before this document can be successfully inserted
into an XML column, the DTD needs to be registered. The following
command registers a DTD where the DTD definition is stored locally
in C:\TEMP and the relational identifier to be associated
with the DTD is "TEST.SUBJECTS": REGISTER XSROBJECT 'http://www.xmlwriter.net/subjects.dtd'
FROM 'file:///c:/temp/subjects.dtd' AS TEST.SUBJECTS DTD
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE copyright [
<!ELEMENT copyright (#PCDATA)>
]>
<copyright>c</copyright>
Before this document
can be successfully inserted into an XML column, the public external
entity needs to be registered. The following command registers an
entity where the entity content is stored locally in C:\TEMP:
REGISTER XSROBJECT 'http://www.w3.org/xmlspec/copyright.xml'
PUBLIC '-//W3C//TEXT copyright//EN' FROM 'file:///c:/temp/copyright.xml'
EXTERNAL ENTITY