|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Variable iteration
Hi all,
I am having the following xslt file
...
<xsl:template match="chunk" mode="content">
<xsl:choose>
<xsl:when
test="@requiredknowledge=preceding::*[name()=concat('chunk_name',$n,'_knowledge')]">
<xsl:copy-of select="section"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
...
In case of any matches this files extracts the
chunks sections that meets the condition. My problem
that I might have something like
chunk_name1_knowledge, chunk_name2_knowledge,
chunk_name5_knowledge, chunk_name9_knoweldge, etc.
which are not sequentially ordered.
How can I assign these different values (i.e numbers)
to the variable $n.
I know that things can be structured in a different
way, but to some extent I think I would need them like
that way.
Many thanks in advance,
Fadi
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








