cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Bug in JXTemplate??
Date Fri, 28 Nov 2003 22:58:12 GMT
On 28.11.2003 11:28, Mariusz Sieraczkiewicz wrote:

> Having
> 
>         <p>
>         <jx:forEach select="#{queryWrapper/data}">
>             <p>
>             <jx:out value="#{.}" />
>             <!--
>             <jx:out value="#{.[4]}" />
>             -->
>             </p>
>         </jx:forEach>
>         </p>
> 
> it seems that jxtemplate tries to evaluate commented out part of code, 
> cause
> i get sth like this
> 
> Original Exception: org.apache.commons.jxpath.JXPathException: No value 
> for xpath: .[4]
>     at 
> org.apache.cocoon.generation.JXTemplateGenerator.characters(JXTemplateGenerator.java:2820)

>     at 
> org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3495)

>     at 
> org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:3179)

>     at 
> org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2790)

> 
> 
> While when the comment i cut out everything's ok.
> 
> Reagards, Mariusz

Please add a bug to buzilla.

BTW ".[4]" is an invalid XPath, should be "self::*[4]". But this one can 
not refer to any node as "self::*" (and also ".") always refer to 
exactly one node.

Joerg


Mime
View raw message