XML Form Definition

An XML form is used by the application to map data from source XML to the work item display. When the application displays a work item form or an Email template, it uses an XML form to get an HTML ID, and populates it with the value pointed to by the XPATH.

For example an entry in the XML form looks like:

<Field>
<ID>HeaderFirstShipDate</ID>
<InputFrom>/Message/Body/Document/BusinessDocument/CatalogAction/C
atalogActionHeader/Date/Code/Normal[text()='FirstShipDate']/../../
DateValue/Value/text()</InputFrom>
<OutputTo>(//Form/Field/ID[text()='HeaderFirstShipDate'])/followin
g-sibling::Value</OutputTo>
<Value />
</Field>

The XML form consists of fields defining specific data to be shown for an ID. Each field contains an 'ID' and an 'InputFrom' tag. The form can, optionally, have 'OutputTo' and 'Value' tags.

  • ID: This tag maps to the ID in the HTML template.
  • InputFrom: This contains the XPATH from which the data is extracted and is shown at the given location identified by ID.
  • OutputTo: This contains an XPATH to which user input is to be written. In most cases, it points to the 'Value' node in the XML form.
  • Value: This tag is a placeholder for any user input that needs to be written out to the XML form.

A form definition looks like:

<?xml version="1.0" encoding="UTF-8"?>
<Form>
<!-- Field elements can be added here for each HTML id -->
<!-- example -->
<Field>
<ID>HeaderFirstShipDate</ID>
<InputFrom>/Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/Date/Code/Normal[text()='FirstShipDate']/../../DateValue/Value/text()</InputFrom>
<OutputTo>(//Form/Field/ID[text()='HeaderFirstShipDate'])/following-sibling::Value</OutputTo>
<Value/>
</Field>
</Form>