[xsl] Accessing array variable

Subject: [xsl] Accessing array variable
From: "Andy Srinivasan" <sriandy74@xxxxxxxxxxx>
Date: Tue, 12 Jun 2001 11:54:35 -0400

I just wanted to access the array variable. I am expriencing difficulties with it.
Here's what I do,

I am trying to convert XML-XML.I have declared a array variable called benefit
<xsl:variable name="benefit">
<period ID='12M'>1</period>
<period ID='18M'>2</period>
<period ID='24M'>3</period>
<period ID='2Y'>4</period>
<period ID='5Y'>5</period>

timePeriod="<xsl:value-of select="benefit/period[@ID =$BP] "/>" </xsl:if>

where BP is another variable that I used in my program. Based on the value I pass to BP, it should select the relevant value from the variable array.

For example, if BP=18M then timePeriod should be 2.

I tried to view the resulting XML in IE5.0, I found the value of timePeriod to be null. It worked in another PC where the same IE5.0 has been installed.
What could be the reason for this?
I tried the same thru a java program using Xalan, it returns null only.

Looking forward for some positive suggestion.


_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread