RE: Re[2]: [xsl] finding position() of an element in a different context

Subject: RE: Re[2]: [xsl] finding position() of an element in a different context
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 26 Apr 2001 10:28:37 +0100
> 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


Current Thread