Re: [xsl] select immediately following siblings with constraints?

Subject: Re: [xsl] select immediately following siblings with constraints?
From: "James A. Robinson" <jim.robinson@xxxxxxxxxxxx>
Date: Thu, 23 Feb 2006 10:54:31 -0800
Wendell,

Thank you very much for the reply.  I actually hadn't been aware of
the << and >> operators, I shall have to read up on them.  I did think
about using a for loop, I just wasn't sure how I could write one which
would be efficent, which wouldn't end up taking a lot more time than
necessary to run down the remaining following-sibling elements.

Thanks for the pointers, this gives me more things to research. :)


> If using XSLT 1.0 I would probably go to this method quickly except 
> in simple cases, where a key-based grouping solution would work. In 
> 2.0 I'd be tempted first to try using its grouping constructs and 
> perhaps fancy XPath 2.0. Which is what I see you're doing.
> 
> Bottom line: you're in uncharted waters. Have fun. Tell us what you 
> find! Take a look at those << and >> operators in XPath 2.0.
> 
> You could even try such things as
> 
>   "for $b in following-sibling::b[1] return following-sibling::a[. 
> &lt;&lt; $b]"
> 
> which might get it into a single line (by using the 'for' construct 
> in an unorthodox way)....
> 
> Cheers,
> Wendell
> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson                       jim.robinson@xxxxxxxxxxxx
Stanford University HighWire Press      http://highwire.stanford.edu/
+1 650 7237294 (Work)                   +1 650 7259335 (Fax)

Current Thread