Re: [xsl] XSL 2.0 - value-of - xml:space="preserve"

Subject: Re: [xsl] XSL 2.0 - value-of - xml:space="preserve"
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Thu, 03 Apr 2008 23:34:14 -0400
On Thu, 2008-04-03 at 22:24 -0500, Eliot Kimber wrote:
> Eliot Kimber wrote:
> > Robert Koberg wrote:
> >>>> On Fri, 2008-04-04 at 10:50 +0800, Michael Kay wrote:
> >>>>> Yes, this is expected. With xml:space="preserve", whitespace
> >>>>> text nodes appearing in a sequence constructor are significant
> >>>>> and are copied to the output, as if they were enclosed in
> >>>>> xsl:text.
> >>>> There is no whitespace between the '=<xsl:value-of/>;' (and I
> >>>> specified separator="")
> >>> Yes, but there is whitespace between the start tag <script> and the
> >>> start tag <xsl:variable>. I'm not certain, but I suspect that's
> >>> your problem.
> >>
> >> OK. I see what you are getting at, but it seems like a bug.
> >>
> >> Why would whitespace affect something that has no whitespace around
> >> it? (especially when specifying separator="" ?) I am guessing, but it
> >> seems like some ContentHandler type-thing is automatically inserting
> >> the first set of whitespace for ever XSL element ??
> > 
> > Try generating the preserve-space with an attribute instruction:
> > 
> > <xsl:attribute name="xml:preserve-space" select="'preserve'"/>
> 
> Ooops, name="xml:space"

The thing is, I don't really care about the output, other than being
valid according to my explicit whitespace instructions. I want the space
to be preserved during my editing! (it is an editor thing and I will
probably be yelled at for being off-topic...). The fact that this
affects the XSL transformation output seems like a bug.

best,
-Rob

Current Thread