Result Tree Fragments

Subject: Result Tree Fragments
From: "Dave Hartnoll" <Dave_Hartnoll@xxxxxxx>
Date: Tue, 28 Nov 2000 10:13:11 -0000
Hello All,

I have been using Saxon 5.5.1 to help me understand the XSLT spec, but I've
come to a point where I can't reconcile Saxon's behaviour with the way I
read the spec. Section 11.1 of the spec describes Result Tree Fragments, and
in particular, describes how operations permitted on them are a subset of
those allowed on node-sets.

Please consider this XSL stylesheet (which can be applied to any xml


<xsl:stylesheet xmlns:xsl=''
<xsl:output method="text"/>

<xsl:variable name="a">

<xsl:template match="/">
  Count   : <xsl:value-of select="count($a)"/>
  Elements: <xsl:value-of select="count($a//*)"/>
  All text: <xsl:value-of select="$a[1]"/>
  Town    : <xsl:value-of select="$a/ADDRESS/TOWN"/>



I believe that the spec invalidates all of the xsl:value-of operations,
although Saxon does give the "right" answers if they were allowed.

I tried a similar stylesheet with MSXML3 in IE5 and it complained on the
first value-of that variable a was not a node-set.

So, my question, is this:
   a) A bug in Saxon
   b) A deliberate extension to Saxon
   c) My misunderstanding of the spec

Many thanks,
Dave Hartnoll.

 XSL-List info and archive:

Current Thread