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

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

Subject: XSL 2.0 - value-of - xml:space="preserve"
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Thu, 03 Apr 2008 22:41:55 -0400
 XSL 2.0 - value-of - xml:space="preserve"
Hi,

I have the following in a template. I have copied it directly from the
template without removing indentation spaces (I don't use tabs):

      <script type="text/JavaScript" xml:space="preserve">
...
        <xsl:variable name="acknowledge">
          <xsl:choose>
            <xsl:when test="$task-type=5">3</xsl:when>
            <xsl:otherwise>1</xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
          document.getElementById("status").value=<xsl:value-of
separator="" select="$acknowledge"/>;

     </

The above produces:

          document.getElementById("status").value=
          1
        ;

This is being output with xsl:result-document:

<xsl:result-document href="{$out-path}" encoding="UTF-8" indent="no"
method="xml">
...

The problem is the xml:space on the script element. If removed, it
renders as (I) expected. If xml:space="preserve" is present on the
script element, is the result above expected behavior?

thanks,
-Rob

p.s. I haven't looked into this too deeply, but I put an as attribute
with a schema type (yes, I declared the namespace):
<xsl:variable name="acknowledge" as="xs:integer">
and my page rendered empty. ?

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.