This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Problem in define Node-set from variable number of params
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Problem in define Node-set from variable number of params
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 29 Mar 2001 10:36:24 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I have following problems in using variable params to define
> a node-set variable and need your kind advice.
>
> But when I use the variable of "condition2" generated from
> various params
> test, it fails.
>
> <xsl:variable name="condition2"><xsl:attribute name="select">
> <xsl:choose>...
>
condition2 is a so-called result tree fragment; the value of the variable is
in effect a node-set containing the root node of a new tree. The
<xsl:attribute> instruction tries to add an attribute node to this tree. But
root nodes don't have attributes, only element nodes can have attributes. So
the <xsl:attribute> should fail saying there is no element node to attach
the attribute to.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list