Subject: Re: xsl question (Checking for the existance of a tag) From: Dan Morrison <dman@xxxxxxxx> Date: Tue, 04 Apr 2000 20:26:32 +1200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: xsl question (Checking for the , Alankar Chowdhury | Thread | Re: xsl question (Checking for the , Nikolai Grigoriev |
Re: efficient filtering of XML file, David Carlisle | Date | Re: efficient filtering of XML file, David Carlisle |
Month |