xsl-list
[Top] [All Lists]

[xsl] Iterate through variable in XSLT?

2007-08-18 01:08:09
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>