[patch] libfo-compat.xsl and significant space

Tim Waugh <[email protected]>
Newsgroups gmane.text.xml.xmlroff.general
Message-ID <[email protected]>
Here is a patch to fix significant space handling in
libfo-compat.xsl.  This preserves spaces between text nodes and (for
example) fo:inline nodes.

Tim.
*/

--- /usr/share/xml/libfo-0.3.1/libfo-compat.xsl	2005-03-09 15:21:42.000000000 +0000
+++ libfo-compat.xsl	2005-03-09 19:20:11.000000000 +0000
@@ -75,7 +75,13 @@
   </xsl:template>
 
   <xsl:template match="text()">
+    <xsl:if test="contains(' &#xA;',substring(.,1,1))">
+      <xsl:text> </xsl:text>
+    </xsl:if>
     <xsl:value-of select="normalize-space()"/>
+    <xsl:if test="contains(' &#xA;',substring(.,string-length(),1))">
+      <xsl:text> </xsl:text>
+    </xsl:if>
   </xsl:template>
 
   <xsl:template match="@border">


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.