Ugo Cei wrote:
This patch seems to have broken some of the JX templates I was using.
In particular, I had templates where the jx namespace prefix was
declared in a single jx:forEach element (most of the content is
static and I just need to interate a collection to display a table):
<jx:forEach items="${channels}" var="channel" xmlns:jx="http://
apache.org/cocoon/templates/jx/1.0">
...
</jx;forEach>
Now these templates throw the following exception:
java.lang.IllegalStateException: Misbalanced enter and leaving of scope.
at org.apache.cocoon.xml.NamespacesTable.leaveScope
(NamespacesTable.java:228)
at org.apache.cocoon.xml.RedundantNamespacesFilter.endElement
(RedundantNamespacesFilter.java:72)
at org.apache.cocoon.generation.JXTemplateGenerator.execute
(JXTemplateGenerator.java:2632)
at
org.apache.cocoon.generation.JXTemplateGenerator.performGeneration
(JXTemplateGenerator.java:2497)
at org.apache.cocoon.generation.JXTemplateGenerator.generate
(JXTemplateGenerator.java:2491)
A simple workaround consists in putting the namespace declaration in
the root element of the template, but this is not nice to people who
have lots of templates to change. Is this a bug or a feature?
This is clearly a bug, either in NamespacesTable or in JXTemplate. I'll
take care of this ASAP.
Just a precision though: what's are the direct children of the
<jx:forEach>? Text, elements, mixed content?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director