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

Re: Process the following group

Subject: Re: Process the following group
From: "Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Jul 2022 20:20:11 -0000
Re:  Process the following group
Normally you shouldnbt need to process a preceding group in the context of
processing a current groupbthat suggests a procedural way of thinking about
the problem. Or else you can just use normal XPath to select things from
preceding nodes starting with the nodes in the current group.

However, it may be that what you need is a multiple-phase process, where you
do grouping to create a hierarchical structure and then apply additional
processing to that so you can now use normal XPath selection of things in
preceding groups, i.e.:

<xsl:variable select=bgroupedb as=belement()*b>
  <grouped xml:base=b{base-uri(.)}b>
   <!bdo grouping here b"
  </grouped>
</xsl:variable>
<xsl:apply-templates select=b$groupedb
mode=bdo-something-with-groupsb/>

Note that I added @xml:base to the element that contains the grouped result so
that any relative URI resolution applied to the grouped elements will have the
correct base URI.

Cheers,

E.
_____________________________________________
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> |
Twitter<https://twitter.com/servicenow> |
YouTube<https://www.youtube.com/user/servicenowinc> |
Facebook<https://www.facebook.com/servicenow>

From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thursday, July 7, 2022 at 3:11 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re:  Process the following group
[External Email]



On 07.07.2022 21:59, rick@xxxxxxxxxxxxxx<mailto:rick@xxxxxxxxxxxxxx> wrote:



I need to do more study on grouping. I wonder if given a certain group, can
you process the preceding group if you want to?



If you store groups first e.g. in a sequence of arrays or an array of arrays,
then I think you can do that.
XSL-List info and
archive<https://urldefense.com/v3/__http:/www.mulberrytech.com/xsl/xsl-list__
;!!N4vogdjhuJM!EIKmg7GWTh1yHrVfbm7jsfdhlCDLup6l5s5lbhXOQvsqIr4Ds7gbREPZT-qd0Y
LAh0omDjYi-1xfoIs2EKdC3TjF4myfruenS1eD8T39cOg$>
EasyUnsubscribe<https://urldefense.com/v3/__http:/lists.mulberrytech.com/unsu
b/xsl-list/3453418__;!!N4vogdjhuJM!EIKmg7GWTh1yHrVfbm7jsfdhlCDLup6l5s5lbhXOQv
sqIr4Ds7gbREPZT-qd0YLAh0omDjYi-1xfoIs2EKdC3TjF4myfruenS1eDNBJdOS4$> (by
email<>)

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.