Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
Library | Service | Contents | Index

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

## Buyer-Hosted Catalogs

This section describes the XML specification for loading the iProcurement unified catalog from external sources. The specification supports the following functionality:

- Catalog schema (item classification data) modifcation

  - Add, rename, or delete a category

  - Add, rename, or delete a descriptor (a category attribute)

- Item addition and category assignment

- Item deletion and modification

### Document Type Definition (DTD)

Special characters and non-XML markup must be escaped for the XML parser to function correctly. Specifically, the & and <> characters must be escaped with a CDATA tag.

    <![CDATA[ your data here ]]> inserted in any tag for special characters.

    <SCHEMA>
       <CATEGORY ACTION="DELETE">
           <NAME><![CDATA[Pen & Pencil Gifts Sets]]></NAME>
       </CATEGORY>
    </SCHEMA>

Also, if there are any " (double quote) characters within the data itself, these should be replaced by the following character sequence: &quot;

For example:

    <itemDescription><![CDATA[6&quot; diameter pipe]]></itemDescription>

Catalog information is divided into three main categories:

- DTD Admininistrative Information: <ADMIN>

- DTD Schema Information: <SCHEMA>

- DTD: Item Information

Figure 10-3 shows the DTD hierarchical diagram of the catalog:

#### Figure 10-3 Buyer-Hosted Catalog: DTD Hierarchical Diagram

### iProcurement Example 1: DTD for Buyer-Hosted Catalog

Here is the Buyer-Hosted catalog DTD:

    <?xml version="1.0"?>
    <!DOCTYPE CATALOG [

    <!ELEMENT CATALOG ( ADMIN, SCHEMA?, DATA? ) >
    <!ATTLIST CATALOG xml:lang NMTOKEN #IMPLIED >

    <!ELEMENT ADMIN ( NAME, INFORMATION) >
    <!ELEMENT SCHEMA (CATEGORY | The  DESCRIPTOR)* >
    <!ELEMENT DATA (ITEM)*>

    <!ELEMENT NAME (#PCDATA) >
    <!ELEMENT INFORMATION ( DATE, SOURCE )  >
    <!ELEMENT DATE (#PCDATA) >
    <!ELEMENT SOURCE (#PCDATA) >

    <!ELEMENT CATEGORY (NAME | KEY | TYPE | UPDATE  )* >
    <!ATTLIST CATEGORY ACTION (ADD|DELETE|UPDATE) #REQUIRED>
    <!ELEMENT DESCRIPTOR (NAME | KEY | UPDATE | OWNER  | TYPE )* >
    <!ATTLIST DESCRIPTOR ACTION (ADD|DELETE|UPDATE) #REQUIRED>
    <!ELEMENT OWNER (NAME?, KEY? ) >
    <!ELEMENT KEY (#PCDATA) >
    <!ELEMENT TYPE (#PCDATA) >

    <!ELEMENT ITEM (OWNER?, NAMEVALUE*, UPDATE ) >
    <!ATTLIST ITEM ACTION (ADD | DELETE | UPDATE) #REQUIRED>
    <!ELEMENT UPDATE (NAME | KEY | NAMEVALUE )* >

    <!ELEMENT NAMEVALUE ( NAME, VALUE ) >
    <!ELEMENT VALUE (#PCDATA)* >
    ]>

Note: iProcurement does not validate the DTD during the parsing process and therefore does not require a copy of the DTD in the code tree. It is provided here for reference only.

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index