Inserting Fields that Reference Other Documents

When you are creating cross document links in single style layouts in Word, you can drill down to find fields in linked schemas. Proliance schemas can reference one other schema, multiple schemas, or can leave an open reference that allows you to link to any other schema. If a single schema is defined, you can only drill into one document type. If multiple schema are defined, you need to identify which document type you want to drill into depending on CPL requirements. Word allows you to drill down to any document type as long as the schemas are included in the document.

If you have one of the following fields listed in the XML Task Pane, you can also drill down to other schemas through the DocReference field:

The example below illustrates how the Workspace, Company, and Company Location documents are linked and how you can incorporate fields from other documents into your layout. Although this example illustrates drilling down into three elements, you can drill down into any number of elements as long as you have the appropriate schemas attached to the Word document.

Cross Document Linking Example

When creating cross document links in a Word document, you need to ensure that all the appropriate schemas are attached to the Word document.

ClosedImage

Templates and Add-ins dialog box - XML Schema tab.

Once the schemas are attached, you will see them on in the XML Task Pane. Ensure that you have given an appropriate alias to your schema and that the namespaces are displayed. For a list of the schemas available, see "Mapping Documents and Registers to XML Schemas".

ClosedImage

XML Structure dialog box.

You can start to insert your elements in the appropriate locations. While you can start with elements from any schema, you must start with the main document. In this example, the main document is the Workspace document. When you reach an element that can link to another document, Word displays the <DocumentData> element. At this point you need to insert at least one element to get the error resolved. Otherwise you cannot save the Word document as an .XML file.

ClosedImage

XML Structure dialog box. Select document data element.

Selecting the schema adds the <DocumentData> element for that schema.

ClosedImage

XML Structure dialog box, select document data element.

You can drill down into the linked schema to find and insert the appropriate elements into your layout. You will come across other linked schemas and again Word displays the <DocumentData> element.

ClosedImage

XML Structure dialog box, apply document data element.

And again, you can select the schema, add the <DocumentData> element and continue to insert elements.

ClosedImage

XML Structure dialog box, insert elements.