Re: [xslt] Rogue newline appearing between elements



In message <548ebbd14a.Justin@gerph.movspclr.co.uk>
          Justin Fletcher <justin.fletcher@ntlworld.com> wrote:

> Hiya,
>
> With xsltproc from libxslt 1.0.6, I'm getting a rogue new line appearing
> in my output and I cannot see where it's coming from. If there is something
> special in the specification that covers this behaviour, it has elluded
> me. I have cut down the stylesheet and data set to about as small as I can
> make it whilst retaining some vague sense and still exhibit the oddity.
>
> Command used to process input:
>   *xsltproc -o data.html data.xsl data.xml
>
> --8<-------- data/xsl
> <?xml version="1.0" standalone="yes"?>
>
> <xsl:stylesheet version="1.0"
>                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                 xmlns="http://www.w3.org/TR/xhtml1/strict";>
>
> <xsl:output method="html" indent="no"/>

[snip]

Further to my previous email, if I make the output method xml, the
'rogue white-space' goes away; which lead me to investigate a little
further.

libxslt calls htmlDocContentDumpOutput in xsltSaveResultTo. This in
turn calls htmlDocContentDumpFormatOutput with the 'format' parameter
set to 1, which forces formatting return/spaces to be added. Should there
be a way of calling htmlDocContentDumpFormatOutput directly with an
option for the formating, rather than forcing the use of it ?

As it is, the generation of the list elements with whitespace after them
is forcing undesired whitespace in the output HTML and I don't think that
should be the case.

-- 
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]