|
Subject: [xsl] possible usage of variables From: fadi qutaishat <fadi_taher2000@xxxxxxxxx> Date: Wed, 11 May 2005 14:18:35 -0700 (PDT) |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] compare two unicode varia, hochen | Thread | Re: [xsl] possible usage of variabl, David Carlisle |
| [xsl] compare two unicode variables, hochen | Date | Re: [xsl] possible usage of variabl, David Carlisle |
| Month |