Re: XSL-FO / XSLT Transformations & Line Breaks in XML
The problem you're seeing is caused by the actions taken (more properly, by the actions *not* taken) in your .../header template.
In particular, the code fragment:
tells the XSLT processor to extract the string value of the para element contained in the header element. That extracts *all* of the text in the paragraph and completely ignores the linebreakhere element because it has no string value.<fo:block space-before="30" space-after="30"> <xsl:value-of select="para"/> </fo:block>
In other words, all of the text in the paragraph is consumed immediately. I doubt that the linebreakhere element gets processed at all, because it's embedded in the para element, which shields the linebreakhere element from being processed by the template you provided for it.
What you should try is:
but define another template to handle the para element. A very rough approximation of the XSLT might look something like this:<fo:block space-before="30" space-after="30"> <xsl:apply-templates/> </fo:block>
Try this out and see how you fare.
Hope this helps, Jim
P.S., I'll obviously blush as soon as somebody tells me what foolish error *I*'ve made here :-)
At 5/4/2005 06:18 AM, craig webber wrote:
For arbitrary breaks, the XSLT processor needs to be able to recognize something, so you need an element in the middle of the text, thus:
Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
Co-Chair, W3C XML Query WG; F&O (etc.) editor Fax : +1.801.942.3345
Oracle Corporation Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA Personal email: jim at melton dot name
= Facts are facts. But any opinions expressed are the opinions =
= only of myself and may or may not reflect the opinions of anybody =
= else with whom I may or may not have discussed the issues at hand. =
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format