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