[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl question (Checking for the existance of a tag)

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
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.