W
Wredniak
i have data in xml
i want them to display in html (<table>). i can do it, but i don't
know how to change <tr bgcolor="...">
i use
<xsl:template match="spolka">
<tr>
<td><xsl:value-of select="nazwa"/></td>
<td align="right"><xsl:value-of select="kapital"/></td>
<td align="right"><xsl:value-of select="udzial"/></td>
<td align="right">
<xsl:if test=" www='' ">
brak www
</xsl:if>
<xsl:if test=" www!='' ">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of
select="www"/></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="www"/>
</xsl:element>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="podgrupa">
<tr><td colspan="4" align="center"><strong><xsl:value-of
select="rodzaj"/></strong></td></tr>
<xsl:apply-templates select="spolka"/>
</xsl:template>
the other thing is how to make a working <a href=""..
i make it with element and attributes .. but is there any easier
method?
(sorry for my bad english)
i want them to display in html (<table>). i can do it, but i don't
know how to change <tr bgcolor="...">
i use
<xsl:template match="spolka">
<tr>
<td><xsl:value-of select="nazwa"/></td>
<td align="right"><xsl:value-of select="kapital"/></td>
<td align="right"><xsl:value-of select="udzial"/></td>
<td align="right">
<xsl:if test=" www='' ">
brak www
</xsl:if>
<xsl:if test=" www!='' ">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of
select="www"/></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="www"/>
</xsl:element>
</xsl:if>
</td>
</tr>
</xsl:template>
<xsl:template match="podgrupa">
<tr><td colspan="4" align="center"><strong><xsl:value-of
select="rodzaj"/></strong></td></tr>
<xsl:apply-templates select="spolka"/>
</xsl:template>
the other thing is how to make a working <a href=""..
i make it with element and attributes .. but is there any easier
method?
(sorry for my bad english)