[xsl] Merging nodes to process with FO

Subject: [xsl] Merging nodes to process with FO
From: Russell Levy <russlevy@xxxxxxxxxx>
Date: Mon, 29 Aug 2005 23:14:49 -0400
I've been using XSLT and FO for a while, but I didn't really learn much in depth about either.

I'm trying to take data from two nodes to create a table in FO. Here would be sample data:

<unit>
 <id>15</id>
 <name>1</name>
</unit>
<unit>
 <id>16</id>
 <name>2</name>
</unit>
<occupant>
 <name>Smith</name>
 <unitid>15></name>
</occupant>
<occupant>
 <name>Jones</name>
 <unitid>15></name>
</occupant>

I would then want rows based on this data, something like this:

1 | Smith
1 | Jones
2 | Vacant

My problem is I can't do a for-each on either the unit or the occupant; if I do it on the unit, I'll only get one row for unit 1, and if I do it on the occupant, I won't get any rows for 2. I also want to be have it sorted by unit, so I wouldn't be able to do a for-each on all occupants, then another on all units that don't have an occupant.
Any advice on doing something like this?


Thanks in advance,
Russell Levy

Current Thread