Re: [xsl] variable in xpath?

Subject: Re: [xsl] variable in xpath?
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Fri, 12 Apr 2002 01:03:24 +0200
> 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
>
> >Try:
> >
> >    select="element[*[name()=$child and . = $value]]"

Hi Steve,

sometimes you need complex XPATH expressions and then you maybe have such
constructs. It's nothing bad or so. And it has the same meaning as a single
predicate:

select all <element> [which have a child element [whose name() is the same
as stored in $child and whose concatenation of all descendant text nodes is
the same as stored in $value]]

But as in every programming language: Don't use too many braces and too many
nestings for readability.

Regards,

Joerg


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread