I am trying to read in an array as a variable and then work over it in a for-each loop.
In xsl the following works for me, but seem not to work in ejen:
if I do the analog in <ejen> with <variable> and <foreach> I get an EjenAttributeException.
<variable name="beans" select="/desc/bean" />
<foreach select="$beans">
<echo message="The current ejb is {$beans/@name}" />
</foreach>
What do I do wrong?
Thanks for your help
Alex Prilop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to read in an array as a variable and then work over it in a for-each loop.
In xsl the following works for me, but seem not to work in ejen:
<xsl:variable name="beans" select="/desc/bean" />
<xsl:for-each select="$beans" >
</xsl:for-each>
if I do the analog in <ejen> with <variable> and <foreach> I get an EjenAttributeException.
<variable name="beans" select="/desc/bean" />
<foreach select="$beans">
<echo message="The current ejb is {$beans/@name}" />
</foreach>
What do I do wrong?
Thanks for your help
Alex Prilop
Hi,
1. You should use:
<echo message="The current ejb is {@name}" />
"$beans/@name" will always give you the same result (ie: the name of the FIRST bean in the node set).
2. I cannot reproduce the exception when I'm using "$beans/@name"... Any details?
Regards,
Franck.