"Kyle Partridge" <kpartridge(_at_)mathsoft(_dot_)com> wrote in message
news:CBEAE06ADC8F9A4BB9E92B4441FA90BE01E99BC6(_at_)mercury(_dot_)mathsoft(_dot_)com(_dot_)(_dot_)(_dot_)
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).
Kyle,
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:
http://aspn.activestate.com/ASPN/Mail/Message/xsl-list/1913969
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