From: Tim W. <tw...@re...> - 2005-06-10 17:08:54
|
Hi, Here is a patch against current CVS that fixes whitespace handling in libfo-compat.xsl. Index: libfo-compat.xsl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/xmlroff/xmlroff/libfo-compat.xsl,v retrieving revision 1.9 diff -d -u -r1.9 libfo-compat.xsl --- libfo-compat.xsl 1 May 2005 19:07:09 -0000 1.9 +++ libfo-compat.xsl 10 Jun 2005 17:07:53 -0000 @@ -50,9 +50,6 @@ =20 <xsl:output method=3D"xml"/> =20 - <xsl:strip-space elements=3D"*"/> - <xsl:preserve-space elements=3D"fo:title fo:block fo:bidi-override fo:in= line fo:leader fo:basic-link fo:multi-case fo:multi-toggle fo:wrapper fo:ma= rker"/> - <xsl:param name=3D"verbose" select=3D"false()"/> =20 <xsl:template match=3D"/"> @@ -62,6 +59,17 @@ <xsl:apply-templates/> </xsl:template> =20 + <xsl:template match=3D"text()"> + <xsl:if test=3D"contains(' 
',substring(.,1,1))"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:value-of select=3D"normalize-space()"/> + <xsl:if test=3D"string-length() > 1 and + contains(' 
',substring(.,string-length(),1))"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:template> + <xsl:template match=3D"fo:list-item-label/text()"> <xsl:if test=3D"$verbose"> <xsl:message>Correcting text child of fo:list-item-label by removing= text</xsl:message> Tim. */ |