Re: [xsl] spacing issue

Subject: Re: [xsl] spacing issue
From: Spencer Tickner <spencertickner@xxxxxxxxx>
Date: Fri, 3 Jun 2005 15:25:30 -0700
Hi david,

Thanks, that worked great. Sorry about the xml example. I think in my
haste I tried to oversimplify it,, plus the fact that's it's friday
and I'm starting to feel my brain ooze out my ear. The real code is
more lik.

:
:
:
<section>
<sectionnumber>2</sectionnumber>
<sectiontext>The Section text</sectiontext>
</section>

and the templates more like

:
:
<xsl:template match="root">
:
:
<xsl:apply-templates mode="something"/>
:
:
</xsl:template>

<xsl:template match="section" mode="something">
<!-- This is where I perform all my template calls for those involved
in the section -->
</xsl:template>


Anyway, it works now either way so thanks for your time and patience.

Spencer

On 6/3/05, David Carlisle <davidc@xxxxxxxxx> wrote:
>
> If you have xsl:output indent="yes" (or are using the html output
> method) change to indent="no".  If that is not the cause of the white
> space then the space is inserted by your stylesheet or copied from the
> source, but as you haven't shown the templat ethat generates
>
> > <p class="para">(...
>
> It's not possible to really say what to change.
>
> If the space is being added by the html output method in places that
> affect the rendering then that is a bug in the xslt system (which
> putting xsl:output indent="no" would work around.
>
> Something is very odd about your input: you have
> <xsl:template match="/">
>         <p class="sub">(<xsl:apply-templates
> select="subsectionnumber"/>)&#xA0; <xsl:apply-templates
> select="subsectiontext"/></p>
> </xsl:template>
>
>
> which means your input has two child elements of the root node, so it is
> not a well formed XML document. How are you supplying this XML fragment
> to the processor?
>
>
> David
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

Current Thread