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

Technical Series: Nested Placeholder in OnBase 17

OnBase 17 introduces a revolutionary new feature to Document Composition: Repeating Placeholders. However, Repeating Placeholders would not be as powerful of a tool as they are without their Nested Placeholders. What exactly is a Nested Placeholder, and what makes them different from the Placeholders I know and love?

A Nested Placeholder is a special kind of Placeholder that can take on several different values while being composed inside a Repeating Placeholder. As of right now, Document Composition supports Repeating XML Query Placeholders, so their Nested Placeholders are a special kind of XML Query Placeholder with a predefined scope.

Nested Placeholder Creation

You can only create a Nested Placeholder through the Repeating Placeholder wizard. The first panel of a Repeating Placeholder wizard allows you to create Repeating Placeholders, and the second panel allows you to create Nested Placeholders. Creating them in this way ties them to a specific Repeating Placeholder on the template.

Nested Placeholders are always associated with a Repeating Placeholder. After you create a Nested Placeholder, it will not appear in the Placeholder Management Task Pane; instead, Nested Placeholders are displayed one level underneath their associated Repeating Placeholder in the Repeating Placeholder Management Task Pane. That Nested Placeholder cannot exist outside of that associated Repeating Placeholder. In order to insert a Nested Placeholder into the template, its associated Repeating Placeholder must first exist in the template somewhere. You are only able to insert Nested Placeholders into their associated Repeating Placeholder.

How does Document Composition create the XPaths for these Nested Placeholders?

Each Nested Placeholder bases its XPath from the associated Repeating Placeholder’s XPath. In fact, the associated Repeating Placeholder’s XPath is not even included in the Nested Placeholder’s XPath to ensure that the Nested Placeholder remain associated with the Repeating Placeholder.

Using the XML node or nodes reached when evaluating Repeating Placeholder’s XPath as a reference, the available Nested Placeholders include those node’s XML attributes as well as each child element of the reference nodes.

It is possible to create a Repeating Placeholder that does not have any potential Nested Placeholders. This means that the reference nodes, mentioned above, do not have any child elements or any attributes that the Repeating Placeholder can output as values over each iteration of the Repeating Placeholder. You can still use static text and normal Placeholders inside these Repeating Placeholders, but they do not serve the same utility as Repeating Placeholders that use Nested Placeholders.

The two screenshots below demonstrate how Document Composition chooses Nested Placeholders for the Repeating Placeholder with the XPath “/catalog/book”.

Figure 2 - Repeating XML Placeholder Creation

Figure 3 - Nested Placeholder Creation

The Nested Placeholders are comprised of the child elements of “/catalog/book”: author, title, genre, price, publish_date, and description. The Nested Placeholders are also comprised of the attributes attached to the “/catalog/book” elements: id.

How do you use Nested Placeholders?

Just as you normally would! As mentioned above, you cannot use Nested Placeholders outside of their associated Repeating Placeholder, but you can insert them into their Repeating Placeholder just like a normal Placeholder. You cannot use a normal XML Query Placeholder inside of a Repeating Placeholder and get the same results as a Nested Placeholder because the Document Composition engine treats them differently during composition. Normal Placeholders have one value in the composed document that does not change over the course of the composition process; one Nested Placeholder has multiple values in the composed document, one value for each iteration of the Repeating Placeholder. You can also still configure the XPath, output style, and other settings, such as display style and case correction (as applicable) like normal XML Query Placeholders.

Please see a separate blog post for a more detailed explanation on Repeating Placeholders, how they are configured and composed, and tips and tricks revolving around Repeating Placeholders.