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

How to use arrays type of variable in XSLT?

Subject: How to use arrays type of variable in XSLT?
From: Arulraj <p_arulraj@xxxxxxxxx>
Date: Wed, 6 Oct 2004 22:35:45 -0700 (PDT)
xsl arrays
Hello,

In XSLT, we declare some global variable like this..

<xsl:variable name="x1">10</xsl:variable>
<xsl:variable name="x2">100</xsl:variable>
<xsl:variable name="x3">151</xsl:variable>

<xsl:output method="xml" encoding="UTF-8"
indent="yes"/>
<xsl:template match="/">
 <xsl:element name="layout">
  <xsl:call-template name="office-body"/>
  </xsl:element>
</xsl:template>

In other template, I am using position() to extract
the variable value using position() as index.

<xsl:template name="table_row_traversing">
  <xsl:for-each select="table:table-row">
    <xsl:for-each select="table:table-cell">
        <xsl:variable name="col_width">	
	   <xsl:value-of select="position()"/>
	</xsl:variable>
  <xsl:value-of select="x[$col_width]"/>
</xsl:for-each>
</xsl:for-each>
</xsl:template> 

Here I need to get the value x1, x2, x3 etc based on
the position().

I didnt get any output using this code?
Help me..

Thanks
Regards,
Arul				




		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.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.