[xsl] Iterate through variable in XSLT?

Subject: [xsl] Iterate through variable in XSLT?
From: "yun Wu" <chill_gun@xxxxxxxxxxx>
Date: Sat, 18 Aug 2007 08:07:36 +0000
hi all,

basically i like to generic produce the following code rather then write it by myself

<xsl:template match="/">
<classes>
 <class>
   <xsl:attribute name="name">
   <xsl:text>classA</xsl:text>
 </class>
 <class>
   <xsl:attribute name="name">
   <xsl:text>classB</xsl:text>
 </class>
 <class>
   <xsl:attribute name="name">
   <xsl:text>classC</xsl:text>
 </class>
 <class>
   <xsl:attribute name="name">
   <xsl:text>classD</xsl:text>
 </class>
</classes>
</xsl:template>

the data about classes is not in my source XML file, i define it at runtime. i was thinking to define a global variable $classes and iterate it at runtime but i don't know how to achieve that.

please help me out, thanks in advance

_________________________________________________________________
The next generation of Hotmail is here!  http://www.newhotmail.co.uk

Current Thread