Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
B2B: How iProcurement Uses XML to Offer Multiple Catalog Products to Users, 6 of 16
In the catalog, the schema consists of categories and descriptors.
A category or a descriptor can consist of a name, a key, or both. When a key is provided, it is given precedence in identifying the category or descriptor. the DTD's <SCHEMA> caegory and descriptor fields are described in Table 10-2.
Table 10-2 DTD: <SCHEMA> Category and Descriptor FieldsThe catalog schema can be modified by the following sequence. A <SCHEMA> tag has an attribute that specifies a command and sub-tags that define a key and actionable data. The commands are:
The examples below are enclosed in the <SCHEMA> tag.
The following example adds a new category and descriptors to the new category.
<SCHEMA> <CATEGORY ACTION="ADD"> <NAME>Pen Gift Sets</NAME> <KEY>PEN_GIFT_SETS</KEY> </CATEGORY> <DESCRIPTOR ACTION="ADD"> <OWNER> <NAME>Pen Gift Sets</NAME> </OWNER> <NAME>Package Type</NAME> <TYPE>String</TYPE> </DESCRIPTOR> </SCHEMA>
Categories and descriptors require a NAME, or KEY, tag to identify what is to be deleted. For descriptors, this identity is required for the category that contains the descriptor.
<SCHEMA> <CATEGORY ACTION="DELETE"> <NAME>Pen Gifts Sets</NAME> </CATEGORY> <CATEGORY ACTION="DELETE"> <NAME>Pen Gift Collections</NAME> <KEY>3245</KEY> </CATEGORY> <CATEGORY ACTION="DELETE"> <KEY>Laptop Computer</KEY> </CATEGORY> <DESCRIPTOR ACTION="DELETE"> <OWNER> <NAME>Pens</NAME> </OWNER> <NAME>Barrel Color</NAME> </DESCRIPTOR> <DESCRIPTOR ACTION="DELETE"> <OWNER> <KEY>22343</KEY> </OWNER> <NAME>Barrel Color</NAME> <KEY>887665</KEY> </DESCRIPTOR> </SCHEMA>
Categories and descriptors require a name, or key, tag to identify what is to be updated. For descriptors, the name, or key, tag is required for the category that contains the descriptor. Here is an example:
<SCHEMA> <CATEGORY ACTION="UPDATE" > <NAME>Pen Gifts Set</NAME> <UPDATE> <NAME>Pen Gift Sets</NAME> </UPDATE> </CATEGORY> <CATEGORY ACTION="UPDATE"> <KEY>C440911</KEY> <UPDATE> <NAME>Compressor Motors</NAME> </UPDATE> </CATEGORY> </SCHEMA>
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|