cancel
Showing results for 
Search instead for 
Did you mean: 
Tony_Maimone
Star Collaborator
Star Collaborator

Technical Series: Repeating Placeholders - Q&A or Tips and Tricks

What is the easiest way to create a Repeating Placeholder?

With sample XML in the viewer, you can use selection to automatically generate an XPath and then manually refine that XPath to avoid typing out the entire thing.

How do I edit a Nested Placeholder?

Remember that Nested Placeholders are just XML Query Placeholders that are scoped to a specific Repeating Placeholder. You can edit a Nested Placeholder to bring up additional settings allowing you to configure options such as Display Style and Case Correction just like for regular XML Query Placeholders.

Why am I not seeing any output from my Repeating Placeholder?

If you are not seeing any values on your composed document, check the Trace Viewer and System Warnings tabs in Diagnostics Console. Did you use a function in the XPath of your Repeating Placeholder that returns a Boolean, numeric, or string value instead of a node set? Does your sample XML actually contain a value for the element returned by your XPath?

Are Document Composition Fragments supported within a Repeating Placeholder?

We do not currently support Document Fragment Placeholders that contain Placeholders within Repeating Placeholders when using Composition Preview.. Otherwise, you should be able to insert a regular Placeholder within you Repeating Placeholder. Please remember that using a regular Placeholder within a Repeating Placeholder will output the same value for each composed instance of the Repeating Placeholder on your document. Nested Placeholders are still the only way to display dynamic content for your Repeating Placeholders. 

Are Document Composition HTML or User Prompts supported within a Repeating Placeholder?

We also do not currently support HTML Prompt or User Prompt Placeholders within Repeating Placeholders.

Why am I getting a warning box when editing my XPath for a Repeating Placeholder?

If you manually typed your XPath and received the blue warning box, but think the XPath you entered is valid, double check to ensure there is not a typo and that the sample XML contains a corresponding element. If your XML uses namespaces, also ensure you included any appropriate prefixes in the XPath.

Why does my XPath display with an ellipsis ‘…’?

When the XPath length is longer than the text box, it will end in an ellipsis. You can hover over the XPath to bring up a tool tip with the entire value visible.

How do I create an additional Nested Placeholder with different configuration options?

If you wish to create a second Nested Placeholder for an element so that you can specify two different configurations, hover over the appropriate Repeating Placeholder in the Repeating Placeholder Management task pane and select the ‘+’ button and move the Nested Placeholder from the available to the selected list.

Why did the XML Highlighting stop working when creating XML Repeating Placeholder?

If you are using selection in the viewer and notice highlighting is off or an XPath is generated that you did not expect, check the structure of your XML for ambiguity. For example, are both //book/author and //magazine/author valid XPaths for your XML? When you select “author” we interpret your selection as //author and only retrieve the first author node we find in the XML. Without any additional context, we generate //book/author even if you intended //magazine/author. You can still manually enter the exact XPath to get the desired elements.

Can you insert a Repeating Placeholder within a Repeating placeholder?

Repeating placeholders can be inserted within another Repeating placeholder and allows for multi-level repeating output. If you inserted a Repeating Placeholder within another Repeating Placeholder on your template and no values are composed for the inner Repeating Placeholder, verify the relationship between the XPaths of your outer and inner Repeating Placeholders. Looking at your XML, the nodes represented by the XPath of your inner Repeating Placeholder should be descendants of the nodes represented by the XPath of your outer Repeating Placeholder. When we evaluate the XPath of the inner Repeating Placeholder, we have already narrowed the scope of the XML and are evaluating the XPath against the set of nodes returned by the XPath of the outer Repeating Placeholder. Because we are not evaluating the inner Repeating Placeholder’s XPath against the entire XML document, it is important that the outer-inner Repeating Placeholder relationship represents an ancestor-descendant relationship within the XML.

Can you create a Repeating placeholder without any Nested placeholders?

You are able to create Repeating Placeholders that do not have any associated Nested Placeholders. Although this practice is technically valid, it is not recommended to insert a Repeating Placeholder on the template that does not contain any Nested Placeholders because the incentive for using a Repeating Placeholder becomes nullified in this case.

Tips and Tricks

1.      If your XPath is approaching the character limit, try using a relative XPath.

Refine your XPaths to get subsets of data using XPath functions (read more about this in Technical Series: Leveraging XPath Functions in OnBase 17)

2.      When using namespaces, explicit prefixes in the XPath count toward the character limit but default namespace (without a prefix) do not. For more information on XML namespaces, please see Technical Series: XML Namespaces in OnBase 17

3.      When editing the Output Style of a Nested Placeholder, remove the Nested Placeholder from the template, change the Output Style, and then reinsert the Nested Placeholder on the template.