Hello I'm trying to create grouping in the pdf file and I have to use grouping inside another grouping. f.e. group by date, then group by name, then by city...
xml:
<record>
<name>Palace1</name>
<info>
<date>2012-01-01</date>
<city>Random1</city>
</info>
<info>
<date>2012-01-01</date>
<city>SuperRandom</city>
</info>
<info>
<date>2012-01-02</date>
<city>Random22</city>
</info>
...
</record>
<record>
<name>Palace2</name>
<info>
<date>2012-01-01</date>
<city>Random99</city>
</info>
<info>
<date>2012-01-02</date>
<city>Random1</city>
</info>
...
</record>
...
So lets say we need to group our records by date from 2012-01-01 to 2012-01-01 and the group them by name
Date 2012-01-01
Place1
Random1
SuperRandom
Palace2
Random99
Date 2012-01-02
Palace1
Random22
Palace2
Random1
SO I was using
<xsl:for-each-group select="dt:record" group-by="dt:info/dt:date">
<xsl:sort select="dt:date" order="ascending"/>
<fo:block font-weight="bold"> Date: <xsl:value-of select="format-dateTime(dt:date,'[Y0001].[M01].[D01]','en',(),'lt')"/></fo:block>
<xsl:for-each select="current-group()"> //here im guessing we should put another for- each-group
<xsl:for-each-group select="parent::dt:info/dt:record" group-by="dt:name">
<fo:block>Place1 <xsl:value-of select="dt:name"><fo:block>
<xsl:for-each select="current-group()">
<fo:block> <xsl:value-of select="dt:info/dt:city"></fo:block>
</xsl:for-each>
</xsl:for-each-group>
</xsl:for-each>
</xsl:for-each-group>
but this doesn't work... for some reason I get way more record names then I should