Subject: RE: [xsl] XSL 2.0 - value-of - xml:space="preserve" From: Robert Koberg <rob@xxxxxxxxxx> Date: Fri, 04 Apr 2008 07:24:34 -0400 |
Ahh..! Thank you, I get it now. On Fri, 2008-04-04 at 19:20 +0800, Michael Kay wrote: > > Apologies for being dense and dragging this on, but I seem to > > have a fundamental misunderstanding. Can you or someone else > > explain where the whitespace is with regard to the > > xsl:value-of in something like: > > > > <script xml:space="preserve"/> > > <xsl:variable name="my-var"> > > <xsl:choose> > > <xsl:when test="true()">1</xsl:when> > > <xsl:otherwise>2</xsl:otherwise> > > </xsl:choose> > > </xsl:variable> > > var myvar=<xsl:value-of select="$my-var" separator=""/>; </script> > > I have marked potential significant whitespace with an X: > > <script xml:space="preserve"/>X > XX<xsl:variable name="my-var">X > XXXX<xsl:choose> > <xsl:when test="true()">1</xsl:when> > <xsl:otherwise>2</xsl:otherwise> > </xsl:choose>X > XX</xsl:variable>X > XXvarXmyvar=<xsl:value-of select="$my-var" separator=""/>;X</script> > > > > To my eyes, there is no whitespace around the xsl:value-of > > and the application is *not* taking me at my word. > > I expect the whitespace you are unhappy with is the whitespace that is part > of the variable value $my-var, generated before and after the xsl:choose > instruction. > > Michael Kay > http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSL 2.0 - value-of - xml:, Michael Kay | Thread | Re: [xsl] XSL 2.0 - value-of - xml:, George Cristian Bina |
RE: [xsl] XSL 2.0 - value-of - xml:, Michael Kay | Date | Re: [xsl] Probelm with xsl:value-of, David Carlisle |
Month |