Re: [xslt] Rogue newline appearing between elements
- From: Justin Fletcher <justin fletcher ntlworld com>
- To: xslt gnome org
- Subject: Re: [xslt] Rogue newline appearing between elements
- Date: Thu, 01 Nov 2001 14:42:30 GMT
In message <20011101090539.W9703@redhat.com>
Daniel Veillard <veillard@redhat.com> wrote:
> On Wed, Oct 31, 2001 at 08:50:38PM +0000, Justin Fletcher wrote:
> > 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 ?
>
> Hum the indent= value in the case of xsl:output with method="html"
> was not taken into account. The enclosed patch fixes it
Checked locally and there's no problems now. Thanks loads. Sorry that the
first report was very longwinded :-)
On a related note, the routine called, htmlDocContentDumpFormat doesn't seem
to be exported in the headers, so I get a warning about an undeclared
function.
--
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]