Mobile app version of vmapp.org
Login or Join
Vandalay110

: Multiple whitespace characters in XML for InDesign I want to use an InDesign workflow where my editor types into an XML document, and I link elements of that document to frames in my layout.

@Vandalay110

Posted in: #AdobeIndesign #WhiteSpace #Xml

I want to use an InDesign workflow where my editor types into an XML document, and I link elements of that document to frames in my layout. Unfortunately, some of our content employs monospace text with multiple whitespace characters in a row.

I'm used to XML ignoring whitespace. Does InDesign ignore whitespace, too?
Will that create a problem when InDesign imports it? If so, how can I work around it?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay110

1 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno310

The “Ignore White Space” setting will get rid of any spaces surrounding closing/opening tags and any trailing spaces before closing tags as leading spaces after opening tags. Choosing to ignore white spaces may result in a gathering of every single text node without concerns for any former pretty XML indentation.

This is harmless if you already have a specific InDesign structure where every text node will be put into its own frame. But it will be an issue if you don't have any specific structure and try to import the XML content onto the page. Then the text will all be collapsed, with the exception of inner spaces.

An option is to use XML entities or hex/dec notation for spaces in the XML file, such as 
, instead of the editor's default space character. Those won't be stripped by InDesign even if “Ignore White Space” is set.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme