[xsl] Re: Getting all the values between empty elements

Subject: [xsl] Re: Getting all the values between empty elements
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 6 Jan 2004 07:06:45 +0100
"Kyle Partridge" <kpartridge@xxxxxxxxxxxx> wrote in message
> Hi All,
> I have one final XPath-related question.
> If I have a series of sibling elements like <a/>, below:
> <p>
> <a/>One or two <b>items</b><a/>or <i>another</i>, I dare
> say<a/><c val="#0f0">a third</c>, do you think?<br/>
> </p>
> how can I get at "everything between one a and the next a"?
> Right now, I am formatting by matching on <br/> and looping backwards
> (this is greatly simplified).


Michael and Wendell provided one solution.

However, be aware that for big files with "a"s with many children this kind
of solution may be slow.

For an efficient solution do have a look at the December thread "Unbounded
element grouping/concatenation ", e.g. at:


Dimitre Novatchev.
FXSL developer

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

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

Current Thread