IBM Version 5 manual DTD Repository

Models: Version 5

1 340
Download 340 pages 15.44 Kb
Page 146
Image 146

Stored Procedure

Description

 

 

dxxGenXML()

uses a DAD file for an XML collection to compose XML

 

documents

 

 

dxx.RetrieveXML

uses an XML enabled collection to compose XML

 

documents

 

 

dxxShredXML()

uses a DAD file for an XML collection to decompose XML

 

documents

 

 

dxxInsertXML()

uses an XMLenabled collection to decompose XML

 

documents

 

 

DTD Repository

The DTD Repository is a table created by the XML Extender when a database is enabled for XML. The table name is DTD_REF. Each row of this table represents a DTD with additional metadata information. Users can access this table to insert their own DTDs. The DTDs in this table are used when the validation of an XML document is requested.

The DTD_REF table has the following columns:

￿DTDID: This column specifies the location of the DTD file that you will insert into the DTD_REF table. For example, our DTD file ’redbook.DTD’ is located in the directory x:\redbooks\SG246586\code\redbook.dtd, where x is the local hard-disk drive letter.

￿CONTENT: This column contains the actual DTD file content. To insert data into the XML enabled column of a table, (depending on the data type you chose for the table column to store the XML data) the insert parameter will be:

db2xml.XMLClobFromFile(’x:\redbooks\SG246586\code\redbook.dtd’)

Here db2xml is the schema qualifier for the function XMLClobFromFile. The full path to the dtd file, required by the function, is specified in parenthesis. We assumed that if you chose XMLCLOB data type for the table column in which you will store the XML data.

￿USAGE_COUNT: this column indicates the number of XML documents for which this DTD is being used.

￿The column names AUTHOR, CREATOR, UPDATOR are self-explanatory.

The DTD_REF table is an administrative support table created by XML Extender for its own use. The other administrative support table is the XML_USAGE table. This table maintains the Document Access Definition (DAD) files. We will now describe what a DAD file is and how it is used.

130 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 146
Image 146
IBM Version 5 manual DTD Repository