Subject: RE: Problem in using "ancestor()" func. in qualifier list of XSL query
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Thu, 27 Jan 2000 09:58:59 -0000
|
> Now, in this "<Seq>" template rule, I want to check whether
> the ancestor "<ElementDecl>" element's "Name" attribute will match an
"<AttDef>"
> element's "Element" attribute. I want to achieve all this in one XSL
query. i.e.
> .
> .
> <xsl:when test = "AttDef[@Name = 'Type' and @AttValue = 'TSet' and
> @Element = ancestor(ElementDecl[@Name])] " />
>
There is no ancestor() function in XPath. You need the ancestor axis.
Something like
<xsl:when test="@Element = ancestor::ElementDecl/@Name">
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|