Hi,
is it normal that the following code fails:
<?xml version='1.0' encoding='windows-1252'?>
<jelly xmlns="jelly:core" xmlns:x="jelly:xml">
<x:parse var="doc">
<a>
<b v="1"/>
<b v="2"/>
<b v="3"/>
</a>
</x:parse>
<set var="i" value="0"/>
<set var="i2" value="0"/>
<x:forEach select="$doc/a/b" var="x">
<x:set var="i2" select="$i2 + number($x/@v)"/>
</x:forEach>
<x:if select="$i2 != 6.0">
<fail>The i2 should be 6! but the value is <x:expr
select="$i2"/></fail>
</x:if>
</jelly>
If I use a "namespace" for the core taglibrary, it does work:
<?xml version='1.0' encoding='windows-1252'?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
<x:parse var="doc">
<a>
<b v="1"/>
<b v="2"/>
<b v="3"/>
</a>
</x:parse>
<j:set var="i" value="0"/>
<j:set var="i2" value="0"/>
<x:forEach select="$doc/a/b" var="x">
<x:set var="i2" select="$i2 + number($x/@v)"/>
</x:forEach>
<x:if select="$i2 != 6.0">
<fail>The i2 should be 6! but the value is <x:expr
select="$i2"/></fail>
</x:if>
</j:jelly>
I'm using the 1.0-beta3 version.
Thanks!
--
To unsubscribe, e-mail: <mailto:commons-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-user-help@;jakarta.apache.org>