[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

possible usage of variables

Subject: possible usage of variables
From: fadi qutaishat <fadi_taher2000@xxxxxxxxx>
Date: Wed, 11 May 2005 14:18:35 -0700 (PDT)
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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.