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: Re[2]: finding position() of an element in a different context


> 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


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