|
Subject: [xsl] xsl:apply-template and xsl:for-ech confusion again From: "Luke Ambrogio" <luke.ambrogio@xxxxxxxxxxxx> Date: Wed, 1 Oct 2003 14:29:14 +0200 |
To riterate
I have
<xsl:template match="tblMIM">
<xsl:choose>
<xsl:when test="$searchby=0">
<xsl:for-each
select="tblMIMCompanies/tblMIMSubSectors[@subsectorID=$subsector]">
<xsl:apply-templates select="tblMIMCompanies"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each
select="tblMIMCompanies/tblMIMSubSectors[@sectorID=$sector]">
<xsl:apply-templates select="tblMIMCompanies"/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tblMIMCompanies">
<table width="100%">
<tr>
<td width="100">Name:</td>
<td><xsl:value-of select="@name"/></td>
</tr>
<tr>
<td width="100">Building:</td>
<td><xsl:value-of select="@building"/></td>
</tr>
</table>
</xsl:template>
the xml looks like
<tblMIM>
<tblMIMCompanies name="A Ltd" building="A House">
<tblMIMSubSectors subsectorID="55" sectorID="3"/>
</tblMIMCompanies>
<tblMIMCompanies name="B Ltd" building="B House">
<tblMIMSubSectors subsectorID="25" sectorID="4"/>
</tblMIMCompanies>
</tblMIM>
but i have no output. any ideas?
regards
Luke
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xsl:apply-template and xsl:fo, Luke Ambrogio | Thread | Re: [xsl] xsl:apply-template and xs, Werner, Wolfgang |
| [xsl] xsl:apply-template and xsl:fo, Luke Ambrogio | Date | Re: [xsl] xsl:apply-template and xs, Luke Ambrogio |
| Month |