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

Re: Using for-each-group on a <day> collection to arra

Subject: Re: Using for-each-group on a <day> collection to arrange a weekday calendar
From: "Michael Friedman sumarimike@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Nov 2017 18:58:47 -0000
Re:  Using for-each-group on a <day> collection to arra
Martin, Christophe,

Thanks for the feedback - I tried Martin's code first and it worked
perfectly. I'm reminded kindly how much I still have to learn, especially
as a visual person with not a lot of math experience.

Sorting by groups was my attempt to change the unexpected output without
knowing exactly what I was doing. It didn't work, but I left it in because
I didn't want to leave anything out when asking for help. Combining the
for-each and apply-templates worked well.

Kind regards,
Michael

The usual approach with positional grouping is by
>
>   <xsl:for-each-group select="descendant::day" group-adjacent="(position()
> - 1) idiv 5">
>
> <xsl:sort select="position()" order="ascending" data-type="number"/>
>>
>
> Not sure what sorting groups by ascending position is supposed to achieve.
>
> <fo:table-row height="15pt" background-color="gray" border-top="1pt solid
>> black">
>> <xsl:for-each select="current-group()">
>> <xsl:apply-templates select="self::day" mode="calendartitle"/>
>> </xsl:for-each>
>>
>
> It seems the for-each and apply-templates can be combined to
>   <xsl:apply-templates select="current-group()" mode="calendartitle"/>

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.