This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: variable in xpath?
- From: Greg Faron <gfaron at integretechpub dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 11 Apr 2002 17:01:43 -0600
- Subject: RE: [xsl] variable in xpath?
- Reply-to: xsl-list at lists dot mulberrytech dot com
At 04:44 PM 4/11/2002, you wrote:
>I will give it a try, but could someone comment on the predicate within
>predicate syntax used here? It is very
>rare - I never saw it beofre
>
>> select="element[*[name()=$child and . = $value]]"
>>or:
>> select="*[*[name()=$child and . = $value]]"
Just read it out loud:
"Select every node named 'element' that itself has a node named $child
and the value of that child node is $value."
In psuedo-xml, it would select all "element" nodes that looked like
<element>
<$child>$value</$child>
</element>
The outer predicate is a condition on which element objects to
select. The inner predicate is a condition on which children of element to
select (as a basis for selecting the parent itself).
Greg Faron
Integre Technical Publishing Co.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list