This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl question (Checking for the existance of a tag)
Alankar Chowdhury wrote:
>
> U are right is serves my need . but I have another 300 attributes like "
> Password "
You're trying to format a 300-column table in HTML ????
And it was OK to write one
<td align="center"><xsl:value-of select="Password"/></td>
for every entry, but the alternative is to much typing?
Fine... for-each the bugger!
<xsl:template match="dmxpsub">
<tr>
<xsl:for-each select="*">
<td align="center"><xsl:value-of select="." /></td>
</xsl:for-each>
</tr>
</xsl:template>
Laziness - the principal virtue of a programmer!
(not 100% sure about the select="*" depending on your parser, but
something like that.
On my parser I can get away with <xsl:for-each><xsl:value-of
/></xsl-for-each>. I love shortcuts!)
.dan.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list