The
XSR_DTD procedure registers a document type declaration (DTD) with
the XML schema repository (XSR).

>>-XSR_DTD--(--rschema--,--name--,--systemid--,--publicid--,---->
>--content--)--------------------------------------------------><
The schema is SYSPROC.
Authorization
The authorization ID of the
caller of the procedure must have at least one of the following:
- DBADM authority.
- IMPLICIT_SCHEMA database authority if the SQL schema does not
exist.
- CREATEIN privilege if the SQL schema exists.
- rschema
- An input and output
argument of type VARCHAR (128) that specifies the SQL schema for the
DTD. The SQL schema is one part of the SQL identifier used to identify
this DTD in the XSR. (The other part of the SQL identifier is supplied
by the name argument.) This argument can
have a null value, which indicates that the default SQL schema, as
defined in the CURRENT SCHEMA special register, is used. Rules for
valid characters and delimiters that apply to any SQL identifier also
apply to this argument. Relational schemas that begin with the string
'SYS' must not be used for this value. XSR objects will not experience
name collisions with database objects that exist outside of the XSR,
because XSR objects occur in a different namespace than objects outside
of the XML schema repository.
- name
- An input and output argument of type VARCHAR (128) that specifies
the name of the DTD. The complete SQL identifier for the DTD is rschema.name and
should be unique among all objects in the XSR. This argument accepts
a null value. When a null value is provided for this argument, a
unique value is generated and stored within the XSR. Rules for valid
characters and delimiters that apply to any SQL identifier also apply
to this argument.
- systemid
- An input parameter of type VARCHAR (1000) that specifies the system
identifier of the DTD. The system ID of the DTD should match the uniform
resource identifier of the DTD in the DOCTYPE declaration of the XML
instance document or in an ENTITY declaration (as prefixed by the
SYSTEM keyword, if used). This argument cannot have a null value.
The system ID can be specified together with a public ID.
- publicid
- An input parameter of type VARCHAR (1000) that specifies the public
identifier of the DTD. The public ID of a DTD should match the uniform
resource identifier of the DTD in the DOCTYPE declaration of the XML
instance document or in an ENTITY declaration (as prefixed by the
PUBLIC keyword, if used). This argument accepts a null value and should
be used only if also specified in the DOCTYPE declaration of the XML
instance document or in an ENTITY declaration.
- content
- An input parameter of type BLOB (30M) that contains the content
of the DTD document. This argument cannot have a null value.
Example
Register
the DTD identified by the system ID http://www.test.com/person.dtd and
public ID http://www.test.com/person:
CALL SYSPROC.XSR_DTD ( 'MYDEPT' ,
'PERSONDTD' ,
'http://www.test.com/person.dtd' ,
'http://www.test.com/person',
:content_host_variable
)