Hi, Chris. Chris Bowditch <[EMAIL PROTECTED]> wrote on 2008-08-13 08:21:36 AM: > This has been working fine for several years until recently I > encountered the requirement to pass a space character into the > stylesheet, e.g. > > <xsl:template match="headerline"> > <fo:leader leader-pattern="use-content"> </fo:leader> > </xsl:template> > > No matter what I try the space node in the fo:leader is always dropped!
That behaviour sounds correct, per section 3.4 of XSLT 1.0, "Whitespace Stripping."[1] If you wrap your space character in an xsl:text element, like this, it should work: <xsl:template match="headerline"> <fo:leader leader-pattern="use-content"><xsl:text> </xsl:text></fo:leader> </xsl:template> > However, this works fine when I serialize my stylesheet and call Xalan > via the command line. I'm not sure why the whitespace text node would be preserved in that case, unless you happen to have an xml:space attribute somewhere that you haven't shown. When I try the following stylesheet: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <out> </out> </xsl:template> </xsl:stylesheet> I see the following output, which is what I would expect. <?xml version="1.0" encoding="UTF-8"?><out/> I hope that helps. Thanks, Henry [1] http://www.w3.org/TR/xslt#strip ------------------------------------------------------------------ Henry Zongaro XML Transformation & Query Development IBM Toronto Lab T/L 313-6044; Phone +1 905 413-6044 mailto:[EMAIL PROTECTED]