Import XML character styles into InDesign?

motikata

New Member
SummaryI'm attempting to import some XML into InDesign, tagged for paragraph and character styles. My paragraph styles are working fine, because each item entry has a firm, predictable structure; however, I can't get arbitrary character styles to work, as (within one paragraph) they can occur in any quantity or order.Can you help me?I can't seem to find this addressed in the Adobe documentation.More DetailMy XML looks something like this:\[code\]<root> <item> <title>Lorem <italic>ipsum</italic> dolor.</title> <description><italic>Consectetur.</italic> Ut vel <bold>aliquet.</bold> Maecenas non leo, <italic>in congue.</italic></description> </item> <item> <title><italic>Aenean leo</italic>, interdum <italic>in fermentum.</italic></title> <description><bold>Excepteur.</bold> Non proident, sunt in <italic>mollit anim id est</italic> labore et dolore.</description> </item></root>\[/code\]I have tagged my InDesign file with equivalent tags:Structure
  • root
  • item
Paragraph Styles
  • title
  • description
Character Styles
  • italic
  • bold
In the XML, say in the description field of the first item, two italic sections occur with a bold between them (among other, non-styled text). However, in the second item, the italic follows a single bold. I can't figure out how to tag the template to allow for arbitrary passages like this... it's not like the italic spans show up in the same place for each record.In addition, the passages occur in either or both of the title and description fields.Does this require some JavaScript? I'm not sure where to begin down that road, as text that doesn't match the predefined tagging structure doesn't even make it into my document after import. In other words, there's nothing to process.Thank you in advance.
 
Back
Top