[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(' 
',substring(.,1,1))">
+ <xsl:text> </xsl:text>
+ </xsl:if>
<xsl:value-of select="normalize-space()"/>
+ <xsl:if test="contains(' 
',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