Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSLT : scope of variable evaluated using xalan:evaluate

Status
Not open for further replies.

Ananta77

Programmer
Jan 8, 2006
30
0
0
US
Hi:

I'm facing an issue with variables evaluated using xalan:evaluate.

In .xsl file I'm evluating an expression and getitng data into a variable.
(
<xsl:param name="data" select="xalan:evaluate( @xpathValue ) | $root[ not( current()/@xpathValue ) ]//*[local-name() = current()/@name]"/> )

When on xml file, I use $data/firstElement, it shows o/p properly but for $data/secondElement, $data appears empty.

<column xpathName="concat($data/firstID,', ',$data/secondID)" colLabel="ID" sortable="1"/>

It prints firstID but doesn't print secondID.

I printed on $data at first place, it does have all ID's that it should be having.



 
Before able to think about it further, this line can't possible be what appeared in the xsl document?

><column xpathName="concat($data/firstID,', ',$data/secondID)" colLabel="ID" sortable="1"/>

It should be something at least like this?

[tt]<column xpathName="[red]{[/red]concat($data/firstID,', ',$data/secondID)[red]}[/red]" colLabel="ID" sortable="1"/>[/tt]
 
Line in question, is in xml document. I'm evaluating $data in xml and concating two values from $data
 
So it is capable of self-referencing $data in defining the parameter: data? maybe, maybe not... info missing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top