Hello
An example of the xml I am working with is shown below.
<x>
<y>
<z>
<A>ff</A>
<B>gg1</B>
<C>hh</C>
<D>ii</D>
<E>jj</E>
</z>
</y>
<y>
<z>
<A>kk</A>
<B>gg2</B>
<C>ll</C>
<D>mm</D>
<E>nn</E>
</z>
</y>
<y>
<z>
<A>tt</A>
<B>gg3</B>
<C>uu</C>
<D>vv</D>
<E>ww</E>
</z>
</y>
<y>
<z>
<A>pp</A>
<B>gg1</B>
<C>qq</C>
<D>rr</D>
<E>ss</E>
</z>
</y>
<y>
<z>
<A>ff</A>
<B>gg2</B>
<C>hh</C>
<D>ii</D>
<E>jj</E>
</z>
</y>
</x>
I would like to have separate rows in a table for each unique <B> element.
So far I have only been able to list all three unique values of <B> in one
row at the start of the table. To do this I have used:
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="x.x.x.x">
<fo:block xsl:use-attribute-sets="x.x.x.x">
<xsl:apply-templates select="y/z/B[not(. = preceding::B)]"/>
<xsl:sort select="B"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
This is no good as I need to create other rows below these <B> elements as I
am using them as headings. I have seen examples using the Meunchian method
where </br> is used to put a value on a new line (see eg. below) but in the
fo:table I am working with I can only use <fo:table-row>. What is the
equivalent of the <br/> tag using xsl:fo?
<xsl:key name="Group" match="z" use="B" />
<xsl:template match="anything">
<xsl:for-each select="contact[count(. | key('Group', B)[1]) = 1]">
<xsl:sort select="B" />
<xsl:value-of select="B" />,<br />
Thankyou very much for your help.
James