Altho I make a model of the tags as I want them to appear, InDesign ignores many of the returns and other non-tagged bits and flows several tags together into one paragraph hard return.
So far I have learned that I will probably need an XSLT declarations file and combine it with an Import XML command in order to make some tagged elements appear on 1 line and/or also to ensure that some tagged elements are separated onto two lines with a hard return.
Can anyone steer me to an online example file? From what I have been reading, the xslt declarations should be fairly brief in such a file. But I've not written nor studied XSLT and am not sure where to start.
Yes, I'd like to ask again: where can I get xslt files to ensure all xml tag elements arrive on separate paragraph returns?
Where can I get an example xslt file that causes some xml tag element content to appear on the same paragraph line?
is helpful and probably meets my need about halfway.
I have 18 elements of text to import from my xml file: 14 should be forced to separate lines while the remaining 4 need to merge onto one paragraph line.
Do any of you know of an existing XSLT example?
Mike in Maryland
So, if the basic idea behind [Jongware]'s XSLT is what you need, you can modify it. For example, let's say you have three elements, foo, bar, and rad. foo and bar should be on their own lines.
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/ | node() | @*">
<xsl:apply-templates select="@* | node()" />
This applies Jongware's line break template to the foo and bar tags, while copying everything else as is. You can add more tags to the second template by separating them with the bar character.