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

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

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:when test="$task-type=5">3</xsl:when>
separator="" select="$acknowledge"/>;


The above produces:


This is being output with xsl:result-document:

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

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?


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