Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

B2B: How iProcurement Uses XML to Offer Multiple Catalog Products to Users, 6 of 16


DTD Schema Information: <SCHEMA>

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 Fields
Field  Required  COMMENT 

Name 

Conditionally required (one of the 2 must be provided) 

Descriptive name for the category or descriptor 

Key 

 

Unique identifier for the category or descriptior 

Owner 

Required for descriptors; optional for categories 

For descriptors, this is the category (name or key) with which you want to associate the descriptor. Setting the owner value to "Root" or 0 designates the descriptor as being applicable for all items/categories. This is known as a "base" or "root" descriptor.

For categories, defining the Owner creates a hierarchical relationship that can be expressed in the Table of Contents. 

Type 

Optional 

If used for a Descriptor, this field indicates that data type of the descriptor value. Valid options include:

  • STRING (Default)

  • NUMBER

  • INTERNATIONAL (indicates that this descriptor value will ultimately have translations when MLS is implemented)

 

The 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.

iProcurement Example 2: DTD <SCHEMA> -- Adding a Category and Descriptor to the Category

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>

iProcurement Example 3: DTD <SCHEMA>: Deleting a Category or Descriptor

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>

iProcurement Example 4: DTD <SCHEMA> -- Updating Category or Descriptor

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>

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index