Martin, your x namespace prefix is not properly bound. Somewhere up in your script, you should have
xmlns:x="jelly:xml" hope it helps. paul Le 3 mai 2011 à 22:59, Martin Gainty a écrit : > > org.apache.commons.jelly.JellyException: > file:/C:/maven-plugin/jelly/commons-jel > ly-1.0-src/test-classes/org/apache/commons/jelly/suite.jelly:29:43: > <x:forEach> > This tag does not understand the 'select' attribute > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:232) > at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) > at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59 > ) > at org.apache.commons.jelly.TestJelly.main(TestJelly.java:32) > > my ForEach tag doesnt support 'select' attribute > any idea where i can obtain the ForEach Tag with select attribute would be > appreciated! > > regarding parsers: > $JELLY_HOME>grep -S -l ".xerces" *.java > ----------- > $JELLY_HOME>grep -S -l ".dom4j" *.java > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\XMLOutput.java > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\expression\xpath\XPath > Expression.java > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\tags\core\FileTag.java > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\xpath\XPathComparator.java > .\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\core\TestFileTag.java > .\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\test\xml\TestCData.java > > looking good for dom4j (working) > Martin Gainty > ______________________________________________ > Jogi és Bizalmassági kinyilatkoztatás/Verzicht und > Vertraulichkeitanmerkung/Note de déni et de confidentialité > Ez az > üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy > jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának > készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és > semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek > könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet > ezen üzenet tartalma miatt. > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem Austausch von Informationen und entfaltet keine rechtliche > Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen > wir keine Haftung fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > destinataire prévu, nous te demandons avec bonté que pour satisfaire informez > l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci > est interdite. Ce message sert à l'information seulement et n'aura pas > n'importe quel effet légalement obligatoire. Étant donné que les email > peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. > > > > >> From: [email protected] >> To: [email protected] >> Subject: RE: [Jelly] XML ForEach tag hangs >> Date: Fri, 29 Apr 2011 21:06:27 -0400 >> >> >> Czaba >> >> which xml-parser are you implementing? >> what is the version of which xml-parser you are implementing? >> >> Martin >> ______________________________________________ >> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und >> Vertraulichkeitanmerkung/Note de déni et de confidentialité >> Ez az >> üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy >> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának >> készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és >> semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek >> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet >> ezen üzenet tartalma miatt. >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht >> dient lediglich dem Austausch von Informationen und entfaltet keine >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. >> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le >> destinataire prévu, nous te demandons avec bonté que pour satisfaire >> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie >> de ceci est interdite. Ce message sert à l'information seulement et n'aura >> pas n'importe quel effet légalement obligatoire. Étant donné que les email >> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter >> aucune responsabilité pour le contenu fourni. >> >> >> >> >>> Date: Sat, 30 Apr 2011 03:02:09 +0200 >>> Subject: [Jelly] XML ForEach tag hangs >>> From: [email protected] >>> To: [email protected] >>> >>> Hello there! >>> >>> I'm trying to use the ForEach tag in Jelly's XML tag library. The >>> following script works fine in a standard Java console application: >>> >>> <x:parse var="doc"> >>> <a> >>> <b v="1"/> >>> <b v="2"/> >>> <b v="3"/> >>> </a> >>> </x:parse> >>> >>> <x:forEach select="$doc/a/b" var="x"> >>> ... >>> </x:forEach> >>> >>> However, if using Jelly on an application server, from inside an EJB >>> container (session bean), running the script above hangs, and 100% CPU >>> utilisation comes. I realized while debugging that NodeComparator >>> class' getDepth method gets into an infinite loop and never returns. >>> >>> If I remove two "b" elements from the xml fragment above (so only one >>> remains), it works fine. It also works if I change the second part of >>> the above script to the following: >>> >>> <x:forEach select="$doc/a"> >>> <x:forEach select="b"> >>> ... >>> </x:forEach> >>> </x:forEach> >>> >>> Does anyone have any idea why is that happening? Any help is much >>> appreciated. >>> >>> Thank you: >>> Csaba >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
