| Subject: [xsl] Assistance with for-each From: "Maxine Pensyl-Johnson" <Maxine.Pensyl-Johnson@xxxxxxx> Date: Wed, 4 Jul 2007 12:52:29 -0700 | 
I'm trying to get my sample data to all appear on one table row, but I'm
unsuccessful. Any help you can provide is appreciated.
XSLT 1.0   SAXON 6.5.5
Sample Data:
                <reqpers>
                    <person man="1"/>
                    <perscat category="Cook"/>
                    <trade>McDonalds Chef</trade>
                    <person man="1"/>
                    <perscat category="Staff"/>
                    <trade>Front Counter</trade>
                    <person man="4"/>
                    <perscat category="Janitor"/>
                    <trade>Clean up the mess left by others</trade>
                </reqpers>
Desired Results
1	 Cook	 McDonalds Chef
1	 Staff	 Front Counter
4	 Janitor Clean up the mess left by others
Code:
        <xsl:for-each
select="reqpers/person|reqpers/perscat|reqpers/trade">
            <tr>
                <td valign="top"><xsl:value-of
select="person/@man"/></td>
                <td valign="top"><xsl:value-of
select="perscat/@category"/></td>
               <td valign="top"><xsl:value-of
select="trade/text()"/></td>
            </tr>
        </xsl:for-each>
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Testing implicit XHTML hi, Jesper Tverskov | Thread | RE: [xsl] Assistance with for-each, Michael Kay | 
| Re: [xsl] Testing implicit XHTML hi, bryan rasmussen | Date | Re: [xsl] Testing implicit XHTML hi, bryan rasmussen | 
| Month |