This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Re[2]: finding position() of an element in a different context
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: Re[2]: [xsl] finding position() of an element in a different context
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 26 Apr 2001 10:28:37 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Am I not right in saying that if I am in the context of a <visit>
> element, doing:
>
> <xsl:variable name="matchingForm"
> select="//forms/form[(@formtypeID = $formtypeID) and (@visitID =
> $visitID)]"/>
>
> will not work, because "//forms" is taken relative to the context
> node? Certainly this seems to be happening, as no matches are
> occurring.
//forms selects all the <forms> elements in the same document as the context
node.
Your problem is more likely to be your attribute names: your <visit> element
has an @id attribute but no @visitID attribute; similarly there is no
@formtypeID.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list