cancel
Showing results for 
Search instead for 
Did you mean: 

XML Repeating Fields Side by Side Instead of in Series

Nate_Ellenwood
Star Contributor
Star Contributor

Hello all, I am working on a doc comp template that is populated with xml tags. One section is a repeating section and while I am familiar with repeating sections I can only ever get them to stack on top of each other in the repeater. I am wondering if there is a way to have them side by side stacked in two columns so for example if there were 4 items it would be two rows, 5 items would be three rows etc..

1 ACCEPTED ANSWER

Can_Ergin
SME
SME

Hello Nate,

 

Thank you for reaching out on Community.

 

Currently there isn't a way to specify an output direction for Repeating Placeholders. Each repeating item will be inserted in a sequential order top to bottom.

 

However, depending on your XML content, you may be able to achieve a similar look using regular XML placeholders and manual formatting with columns. Any XML Query placeholder on the template with a xpath index over the number of nodes provided in the XML will simply be ignored.

 

For example, given the following sample XML https://www.w3schools.com/xml/cd_catalog.xml

 

We can create the following template layout with several separate regular XML Query placeholders with the following xpath: 

/CATALOG/CD[1]/ARTIST

Where CD signifies the node you are looking for.

 

80dd4db424144b2a8b2b8eeea9a92285

 

27cb7eb83d384784aa31ad5c06682dde

 

And we'd get the following result:

39a2b23c75ee4f5ba3ceacab410fb003

 

There may be other ways to satisfy side-by-side output that doesn't require a software change. But ultimately, a software change to Repeating Placeholders would be the ideal scenario.

View answer in original post

1 REPLY 1

Can_Ergin
SME
SME

Hello Nate,

 

Thank you for reaching out on Community.

 

Currently there isn't a way to specify an output direction for Repeating Placeholders. Each repeating item will be inserted in a sequential order top to bottom.

 

However, depending on your XML content, you may be able to achieve a similar look using regular XML placeholders and manual formatting with columns. Any XML Query placeholder on the template with a xpath index over the number of nodes provided in the XML will simply be ignored.

 

For example, given the following sample XML https://www.w3schools.com/xml/cd_catalog.xml

 

We can create the following template layout with several separate regular XML Query placeholders with the following xpath: 

/CATALOG/CD[1]/ARTIST

Where CD signifies the node you are looking for.

 

80dd4db424144b2a8b2b8eeea9a92285

 

27cb7eb83d384784aa31ad5c06682dde

 

And we'd get the following result:

39a2b23c75ee4f5ba3ceacab410fb003

 

There may be other ways to satisfy side-by-side output that doesn't require a software change. But ultimately, a software change to Repeating Placeholders would be the ideal scenario.