[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSL 2.0 - value-of - xml:space="preserve"

Subject: RE: XSL 2.0 - value-of - xml:space="preserve"
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Fri, 04 Apr 2008 06:59:39 -0400
RE:  XSL 2.0 - value-of - xml:space="preserve"
On Fri, 2008-04-04 at 12:20 +0800, Michael Kay wrote:
> > The fact that this affects the 
> > XSL transformation output seems like a bug.
> 
> No, it's not a bug. The XML specification is quite clear that
> xml:space="preserve" is there to tell the application that whitespace text
> nodes are significant. The application in this case is XSLT, and it's taking
> you at your word.

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>

To my eyes, there is no whitespace around the xsl:value-of and the
application is *not* taking me at my word.

thanks,
-Rob

> 
> Michael Kay
> http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.