[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Navigating <xsl:for-each-group> groups

Subject: Re: Navigating <xsl:for-each-group> groups
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Nov 2015 10:24:45 -0000
Re:  Navigating <xsl:for-each-group> groups
Michael M|ller-Hillebrand mmh@xxxxxxxxx wrote:

Am 13.11.2015 um 15:54 schrieb Rick Quatro rick@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>:

As I am processing a for-each-group, I want to check some of the elements
within the group that are before or after the current node. I can use
preceding-sibling and following-sibling axes, but it doesn't seem like these
are restricted to the current-group. Is there a good way to query what is
before or after the current node of a group, while insuring that the query
stays within the group? Thanks. -Rick

I would understand your requirement in a way that might be solved by using something like this:

preceding-sibling::*[. = current-group()]
following-sibling::*[. = current-group()]

I.e. limit the result of your lookup along the preceding-sibling and following-sibling axes to the current group.


But he did a
  <xsl:for-each-group select="*" group-starting-with="one">

If he had
  <xsl:for-each-group select="*" group-by=".">
then your comparison would make sense.

Or did you want to use the `is` operator e.g.
  preceding-sibling::*[some $item in current-group() satisfies . is $item]
?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.