Configuring Repeating and Nested XML Query Placeholders - Document Composition - Foundation 24.1 - Foundation 24.1 - Ready - OnBase - external - OnBase/Document-Composition/Foundation-24.1/Document-Composition/Configuration/Repeating-Placeholders/Creating-Repeating-Placeholders/Configuring-Repeating-and-Nested-XML-Query-Placeholders - 2024-03-25

Document Composition

Platform
OnBase
Product
Document Composition
Release
Foundation 24.1
License

In the Repeating Placeholders Create New drop-down list, Repeating XML Query inserts a Placeholder into which Nested Placeholders can be inserted. Nested XML Query Placeholders insert a text or image value from an XML string. Use XML to pass in values through the OnBase API.

To create a Repeating XML Query Placeholder:

  1. From the Create New drop-down list, select Repeating XML Query.
  2. The Repeating XML Query dialog box is displayed.
  3. Enter the XML Path in the Selected XPath field using one of the following methods:
    • Type the XML Path in the Selected XPath field. For example, /data/listdata or /data/rowdata. Skip to step 5.

      Note:

      The initial / in the XPath is required if the root node is not specified first in the XPath.

      Note:

      If the XPath contains internal " "(quotation marks), the XPath must be entered into the Selected XPath field manually.

    • Click Open to select an XML path from an XML file. Continue to step 4.

  4. Select an XML element or attribute from the XML file content pane. The Selected XPath field is populated.

    If the XML file content is not displayed properly, click Format XML.

  5. Click Add to Repeating Placeholder list.
  6. The selected XPath is displayed in the Repeating Placeholders list.

    To remove the selected XPath from the Repeating Placeholders list, click Delete.

  7. If necessary, click Edit XPath to edit the selected XPath.
    1. Edit the XPath in the Selected XPath field.
    2. Click Accept to accept the changes.

      Click Cancel to cancel the changes.

  8. Repeat steps 3 through 7 to create additional Repeating XML Query Placeholders.
  9. In the Repeating Placeholders list, click the blue bar to collapse a selected XPath. Click the gray bar to expand a selected XPath.

    To collapse all selected XPaths, click Collapse All.

    To expand all selected XPaths, click Expand All.

  10. Click Continue.
  11. The Nested Placeholders dialog box is displayed.
  12. Select a Repeating Placeholder from the Repeating Placeholders list to configure its Nested Placeholders. If no Nested Placeholders are required, skip to step 19.
  13. Select one or more child XML elements or attributes from the Available Nested Placeholders list. Hold Ctrl to select multiple child XML elements or attributes.
    1. To add child XML elements or attributes to the Selected Nested Placeholders list, double-click a single child XML element or attribute or click Add Selected Items.

      To add all available child XML elements and attributes to the Selected Nested Placeholders list, click Add All Items.

    2. To remove child XML elements or attributes from the Selected Nested Placeholders list, select a child XML element or attribute or hold Ctrl to select multiple child XML elements or attributes. Double-click a single child XML element or attribute or click Remove Selected Items.

      To remove all available child XML elements and attributes from the Selected Nested Placeholders list, click Remove All Items.

  14. Repeat steps 12 through 13 to configure additional Nested XML Query Placeholders.
  15. Click Continue.
    Note:

    Nested Placeholders are automatically configured as Single Value, however, the output style can be changed on the Output Style dialog box.

  16. The Output Style dialog box is displayed.
  17. Click each selected Repeating Placeholder to view its Nested Placeholders. Select each Nested Placeholder to view an output style summary and configure any additional settings.
  18. If necessary, click Edit Output Style to edit the selected Nested Placeholder output style.
    1. The Insert the result as drop-down list is displayed.
    2. Select an output style.
      • Single Value- Select to insert the first value returned by the XPath query on the document. Single Value has no additional settings.

      • Image- Select to insert the results of the query as an image. The results of the query must be encoded using Base64 encoding and must be an image format that can be inserted into a Word document. Image has no additional settings.

      • List- Select to insert the results of the query as a list. All content from the top level nodes returned by the XPath query is inserted as a list embedded on the document. This Placeholder appears on the document like other Placeholders. Any list formatting that is applied to the Placeholder is used after the document is created and the values are inserted in the list.

        If the XPath query result includes a delimiter, type this delimiter in the Delimiter (Optional) field.

        For example, if the delimiter is a comma, the XML should be structured as follows:

        <data>

        <listdata>rowdata1,rowdata2,rowdata3</listdata>

        <data>

        If the XPath query result does not include a delimiter, row data must be supplied as individual elements. For example:

        <data>

        <listdata>rowdata1</listdata>

        <listdata>rowdata2</listdata>

        <listdata>rowdata3</listdata>

        </data>

        Note:

        Outline formatting is not supported.

      • Table- Select to insert all the values retrieved by the XPath query as a table embedded on the document. Instances of this Placeholder appear on the document as an empty table. Any column headers entered in the top row of this table are preserved when the values are filled in. Table styles are also preserved.

        In the Column Names field, specify column names as a comma delimited list. These columns should be child elements to row elements. For example, column1,column2,column3. In this example, the XML would be structured as follows:

        <data>

        <rowdata>

        <column1>data1</column1>

        <column2>data2</column2>

        <column3>data3</column3>

        </rowdata>

        </data>

        When inserting values as a table, elements that are not included in the columns specified in the Column Names field are ignored. If a column is not found in a particular row, an empty cell is inserted. If necessary, columns can also be reordered.

  19. Click Finish