|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] possible usage of variables
Hi all,
I have the following snippet of an XSL file
<xsl:template match="page">
<page>
<xsl:apply-templates/>
</page>
</xsl:template>
<xsl:template match="chunk">
<xsl:choose>
<xsl:when test="@requiredknowledge=
number(preceding::chunk_name1_knowledge) ">
<xsl:copy-of select="."/>
</xsl:when>
<xsl:otherwise>
<p> you do not have enough knowledge </p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()"> <!-- do nothing -->
</xsl:template>
</xsl:stylesheet>
The problem now that I want to iterate the <xsl:when>
condition because I have got in the xml resource
chunk_name1_knowledge, chunk_name2_knowledge,
chunk_name3_knowledge,
chunk_name4_knowledge, etc.
Is there away to make
"preceding::chunk_name1_knowledge" variable i.e.
"preceding::chunk_name{variable}_knowledge"
Many thanks,
Fadi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|
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








