Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSL value-of evaluating variable as string and not node

843834Aug 13 2003 — edited Aug 21 2003
Hi,

Take a look at this code. I've been wracking my brain trying to find something that would work with this:

<xsl:if test="starts-with(name(current()),'A_AstSavDL_SEQ_NBR_')">

<xsl:variable name="CURVAL">
<xsl:value-of select="concat('A_AstSavDL_CifSharAvailBal_',$CurNodeValue)"/>
</xsl:variable>

<xsl:element name="{concat('A_ASSET_CURVAL_',$CurNodeValue)}">
<xsl:value-of select="$CURVAL"/>
</xsl:element>
</xsl:if>

This is an example of the logic that i have to apply. This looks for any elements that will start with A_AstSavDL_SEQ_NBR_ and then grabs that CifSharAvailBal with the SEQ_NBR's value (CurNodeValue is already defined elsewhere in the XSL) which is the iterator for the block of XML. Instead of nesting blocks of these individual assets the XML is like this:

<Applicant>
<seq_1>1<seq_1>
<Amount_1 />
<seq_2>2<seq_2>
<Amount_2 />
<seq_3>3<seq_3>
<Amount_3 />
...
</Applicant>

That's why i need to grab the seq_nbr and then concatenate the name of the node with the current iterator.

HOWEVER!

<xsl:value-of select="$CURVAL"/>

gives the string of CURVAL instead of evaluating CURVAL as a valid node in the XML.

HELP! I can't think of a single thing to do. I tried using the value of CURVAL and putting it into the select of a param element, but the param kept giving me errors. What do you guys think?

Thanks

-Andrew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2003
Added on Aug 13 2003
29 comments
2,295 views