Re: select attribute in apply-templates

Subject: Re: select attribute in apply-templates
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 5 May 2000 14:27:51 -0600 (MDT)
I'm probably not going to be the first to respond, but..

>  <xsl:variable name="y">
> [...]
>  </xsl:variable>

With this xsl:variable syntax (not an empty element with a select
attribute), $y is being created as an object of type result tree
fragment. It is constructed during the execution of the instructions in
the stylesheet.

> <xsl:apply-templates select="$y/*"/>

Here, $y is being addressed as if it were an object of type node-set,
which by definition consists of nodes from the source tree. Per XPath, an
object cannot have its type converted to node-set. This should always
fail in a pure XSLT implementation.

Due to popular demand, vendors have implemented their own methods to
allow a result tree fragment to be converted to a node-set. Check the
docs for your XSL processor.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread