Managing XML- and Relational-Formatted Documents

This section provides an overview of managing XML- and relational-formatted documents and discusses how to:

Click to jump to parent topicUnderstanding Managing XML and Relational-Formatted Documents

After you have built the logical format of a document by adding elements and defining element properties, you can build the physical document. The physical document specifies the concrete details of a document, such as database tables, XML tag names, and so on.

Click to jump to parent topicManaging XML-Formatted Documents

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicDefining XML Schema Details

Use the Document Builder - XML page (IB_XMLSCHEMA) to define XML schema details for a document. This page enables you to define root tag names and namespace prefixes, include or exclude the schema reference in the generated XML, filter blank elements, and more.

To access the page, select PeopleTools, Documents, Document Builder and click the XML tab. The following example shows the Document Builder - XML page:

When you initially open the Document Builder - XML page, the XML Schema Details section is collapsed. Click the arrow icon next to the XML Schema Details label to expand the section. The following example shows the XML Schema Details section expanded:

The following page elements appear in the XML Schema Details section:

Root Tag

(Optional) Enter the root tag as it is to appear in the XML document schema.

By default, the system populates the field with the only the first 30-characters of the document name. However, the full document name, up to the document name character limit of 100, appears in the generated XML document schema. The exception is if you modify the Root Tag field and overwrite the default with a new value; if you choose to do so, that value is used as the root tag element in generated schema.

If you overwrite the default value, the character limit is 30 characters.

See Understanding Naming Document Definitions and XML Root Tag Names.

XML Type

Select the XML type from the drop-down list.

Currently, Standard is the only available XML type and is the default value.

Default Primitive Type

Select a value from the drop-down list. The options are:

  • Element: The primitive data types appear as elements in the XML schema. This value is the default.

  • Element and CDATA Section: The primitive data types appear within a CDATA section in the XML schema.

Prefix

(Optional) Enter a target namespace prefix.

No Namespace

(Optional) Select the check box to exclude the document target namespace from the XML schema. You can still use a prefix with this option enabled. Use this option when you want the document to be used as a child document. The document will use the target namespace of the parent. This option enables you to create libraries with schemas that are namespace transparent.

URI

Enter a target namespace.

By default, the system uses the target namespace defined on the Integration Broker Service Configuration page.

Imported Namespace Section

This section displays the namespace prefix and URI of imported document namespaces.

When you add a compound element that is a document data type to a document, the namespace prefix and URI are imported into the document definition.

Include XSD in header

(Optional) Select the check box to include the schema reference in the generated XML.

Trim Whitespace

(Optional) Select the check box to trim leading and trailing whitespace in the generated XML.

Include Description as Comment

(Optional) Select the check box to include descriptions in the generated XML schema.

Filter Blank Elements

(Optional) Select the check box to exclude blank elements in the generated XML. The IsChanged property must be false for primitive PeopleCode objects.

Click to jump to top of pageClick to jump to parent topicDefining Element Details

The Document Builder - XML page features an element details section where you can define element tag names, prefixes, and other details. To access the page, select PeopleTools, Documents, Document Builder and click the XML tab. The area you use to define element details appears under the XML Schema Details section.

To display the section, select an element. The details that you can define and manage appear on the right side of the page.

The following example shows the element details section that appears when the contact_summary element in the document tree of the DEMO_PURCH_ORDER document is selected. Note that the XML Schema Details section is collapsed:

The following page elements appear in the XML Schema Details section:

Element Name

This read-only field displays the name of the selected element.

Tag Name

(Optional) Enter the tag name to appear in the generated XML schema. By default, the system populates the field with the element name.

Prefix

(Optional) Enter a prefix for the tag name.

XML Node Type

From the drop-down list, select the XML node type for the element in the generated XML. The options are:

  • Attribute: The element will appear as an element attribute in the generated XML.

  • Element: The element will appear as an element node in the generated XML. This value is the default.

  • Element and CDATA Section: The element will appear as an element within a CDATA section in the XML schema.

Trim Whitespace

Select whether to trim the leading and trailing whitespace in the generated XML. The options are:

  • No Trim: Leading and trailing whitespace is not trimmed in the generated XML. This value is the default.

  • Trim: Leading and trailing whitespace is trimmed in the generated XML.

Click to jump to top of pageClick to jump to parent topicValidating XML Schemas

The Document Builder - XML page enables you to validate an XML schema for a document. To access the page, select PeopleTools, Documents, Document Builder and click the XML tab. To validate an XML schema for a document, click the Validate button at the bottom of the page. The system displays the validation results in a separate window.

Click to jump to parent topicManaging Relational-Formatted Documents

This section provides an overview of managing relational-formatted documents and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Managing Relational-Formatted Documents

You can use the Document Builder to map PeopleSoft records and fields to documents. Doing so enables you to populate a rowset with a document.

Click to jump to top of pageClick to jump to parent topicMapping PeopleSoft Records to Documents

Use the Document Builder - Relational page (IB_RELATSCHEMA) to map a PeopleSoft record to a document. To access the page, select PeopleTools, Documents, Document Builder and click the Relational tab. The following example shows the page.

When you first access the page, the Relational Details section is collapsed. The Relational Details section is where you select the PeopleSoft record to map to the document. Click the arrow icon next to the Relational Details label to expand the section.

The following section shows the Relational Details section expanded.

To map a PeopleSoft record to a document:

  1. Access the Document Builder - Relational page (PeopleTools, Documents, Document Builder and click the Relational tab).

  2. Expand the Relational Details section.

  3. In the Record field, enter the name of the PeopleSoft record to map to the document or use the Lookup button to select one.

Before you save the record, you should map the record fields to the document elements. If you attempt to save the definition before mapping the document elements to the fields in the record you specified, the system displays an error message. You can save the record without defining all of the field maps and return to the definition at a later time to specify the remaining maps. However, the document will fail validation until you define all maps.

The procedure for mapping elements to record fields is described in the next section.

Click to jump to top of pageClick to jump to parent topicMapping Document Elements to PeopleSoft Record Fields

After you map a PeopleSoft record to a document, you must map the document elements to the record fields.

After you map a record to a document, when you select an element in the document tree, a properties section displays to the right of the document tree, where you can map the element to a record field.

The following example shows a record called ITEMS that is mapped to the document Line_Items. In the document tree, the element item_numbr is selected, and the section to map a record field to the element appears on the right side of the page:

In the properties section, you can enter a field name or use the Lookup button to select from all fields in the record. You also have the option of specifying the field as a key field.

The following example shows that the record field ITEM_NUM has been selected to be mapped to the item_numbr element:

To map document elements to PeopleSoft record fields

  1. In the document tree, click the name of an element.

    The relational elements properties section appears on the right side of the page.

  2. In the Field field, enter the name of the field to map to the element, or use the Lookup button to select one.

  3. Select the Key check box if the field to define the field as a key field.

  4. Repeat steps 1 through 3 to map each element in the document tree.

  5. Click the Save button.