Indicating the Document Type in XML Transaction Maps

Your trading partners might require that you declare the document type in a DOCTYPE element in XML documents you send. The DOCTYPE declaration contains a URL to the document type definition (DTD) or schema that defines the XML document, and tells your trading partner's system which DTD or schema to use to validate the XML.

Note: You can add a DOCTYPE declaration only to transaction maps for XML documents you are sending to a trading partner. XML documents that you receive from your trading partners do not require a DOCTYPE declaration.

To indicate the document type in an XML transaction map:

  1. Access the Business Connect XML mapping utility.

  2. Right-click a transaction in the Trading Partner Tree and select Edit Transaction Map to display the transaction map.

  3. Click the Document Sent to Customer/Vendor tab to display the reply/sent transaction map.

  4. In the Target XML column, right-click any element and select Add DOCTYPE Reference to display the Add DOCTYPE Reference dialog box.

  5. In the System ID Reference field, complete  the URL to the DTD or schema the XML document uses.

  6. http://y.com – The URL path to the location that contains the DTD or schema.

  7. /*.dtd – The DTD file name or schema name. An XML schema's file extension is .xsd.

For example, if the XML document uses the basic commerce XML (cXML) DTD, complete the URL to read http://xml.cxml.org/schemas/cXML/<version>/cXML.dtd, where <version> is the full cXML versions number, such as 1.2.014.

The declaration must be in the correct upper and lower case for the reference to work.

  1. Click OK to add the DOCTYPE reference to the transaction map.

The first element in the Target XML column displays with a yellow icon, indicating that the XML document now contains the DOCTYPE element.

  1. From the File menu, select Save Transaction Map to save the map.

To verify the DOCTYPE in the outgoing XML, preview the XML translation for transaction map's response XML document. To test the document post the XML to Eclipse. You must save the transaction prior to posting.

To remove the document type declaration from an XML transaction map:

  1. Access the Business Connect XML mapping utility.

  2. Right-click a transaction in the Trading Partner Tree and select Edit Transaction Map to display the transaction map.

  3. Click the Document Sent to Customer/Vendor tab to display the reply/sent transaction map.

  4. In the Target XML column, right-click any element and select Remove DOCTYPE Reference.

The system removes the DOCTYPE element and the yellow icon no longer displays in the first element in the Target XML column.

  1. From the File menu, select Save Transaction Map to save the map.

See Also:

Creating XML Transaction Maps

Defining Logical Expressions for XML Data

Mapping XML and Eclipse Data Elements