Henry Zongaro wrote:
Hi All,
thanks to everyone who replied to this thread. Turns out it was a false
alarm. Xml Spy was the one collapsing the spaces when we opened the
resulting files.
Thanks,
Chris
Hi, Chris.
Chris Bowditch <[EMAIL PROTECTED]> wrote on 2008-08-13 11:52:00 AM:
> Florent Georges wrote:
> > Chris Bowditch wrote:
> >><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!
>
> sorry I wasn't clear in my original post. The XSL you suggested is what
> I am actually using:
>
> <xsl:template match="headerline">
> <fo:leader leader-pattern="use-content">
> <xsl:text> </xsl:text>
> </fo:leader>
> </xsl:template>
>
> and the space is still dropped but only when sending the stylesheet via
> SAX Events. It works fine when serialized to a file first but we don't
> want to serialize to a file and re-parse.....
I took a quick look at the source code, and I suspect this is a bug in
the processor. It looks like the processor is always ignoring
whitespace characters that are reported through the
ContentHandler.ignorableWhitespace method, even if that was in the
content of an xsl:text instruction.
Do you happen to know whether the characters in the content of the
xsl:text are being reported through ContentHandler.ignorableWhitespace
or through ContentHandler.characters? If the former, would it be
possible for you to try using the characters method as a work-around
instead - you mentioned that you're generating the stylesheet
programmatically using SAX events.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Toronto Lab T/L 313-6044; Phone +1 905 413-6044
mailto:[EMAIL PROTECTED]