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

Create separate rows in xsl:fo table

Subject: Create separate rows in xsl:fo table
From: "James Steven" <JSteven@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Jun 2004 17:11:29 +0100
xsl table row
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



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.