InDesign - repeating XML tags

New Here ,
Jan 06, 2021

Copy link to clipboard

Copied

I have XML that I'm using to make a catalog, but I'm facing a problem with a certain repeated tag.

In the structure I have short lists

<item>content</item>
<item>othercontent</item>
<item>somethingelse</item>
<item>entirelydifferent</item>

I have <item> assigned to a paragraph style, which works fine for font, bullet points etc. but the problem is that this list is being counted as one single paragraph. The bullet point is being applied only at the front of the first <item> tag, and not the subsequent tags. Subsequent tags are also not having a line break applied to them, any line break in the template gets applied to the end of the last tag when xml is imported.

InDesign is basically treating the above list as:

<item>contentothercontentsomethingelseentirelydifferent</item>

Why does InDesign count repeated identical tags as one and the same tag (and thereby one and the same paragraph), and what can I do to resolve this issue? I need each <item> tag on its own line and with its own bullet point.

n.b. These lists vary in length by product, so I can't just use dummy/placeholder content with a specific number of <item> tags.

Thanks a million for any help that can be provided!

TOPICS
How to, Import and export, Scripting

Views

114

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Valorous Hero , Jan 20, 2021
Loic.Aigon Valorous Hero , Jan 20, 2021
Your problem is likely that you asked to "Clone repeated text elements" and didn't plan to have a carriage return after the first  <item> node. So basically InDesign repeated <item> tag one after the other and you end up with one paragraph.Once that said adding a carriage return is not even enough because it as to be part of the indesign XML structure. To be clear, you need something like<item><item>[carriage return]</items> and the incoming structure must come similarly (to the exception of the...

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Jan 18, 2021

Copy link to clipboard

Copied

Can you share some screenshots & tell us version of InDesign application that you are using.

I tested in InDesign CC 2019, it is working well.

 

Sunil

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Valorous Hero ,
Jan 20, 2021

Copy link to clipboard

Copied

Your problem is likely that you asked to "Clone repeated text elements" and didn't plan to have a carriage return after the first  <item> node. So basically InDesign repeated <item> tag one after the other and you end up with one paragraph.

Once that said adding a carriage return is not even enough because it as to be part of the indesign XML structure. To be clear, you need something like

<item><item>[carriage return]</items> and the incoming structure must come similarly (to the exception of the carriage return) like this

<items>

<item>BLA</item>

<item>BLA</item>

<item>BLA</item>

</items>

 

Then you should get the n paragraphs with their bullet points.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
davidd93477030 AUTHOR LATEST
New Here ,
Jan 22, 2021

Copy link to clipboard

Copied

Hi Loic,

 

That seems to be the issue.  Thanks for pointing this out.  I'll get the XML altered to work with the issue.

 

Thanks a million!

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more