This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: select attribute in apply-templates


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]