From: Jean-Christophe K. <jc...@ba...> - 2005-05-27 09:02:34
|
Thanks for your answer. You're right, I work with Cocoon. If I try this : http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20exist:ser= ialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[contains(TI= TLE,'Tragedy')]%20return%20%3Ctest%3E{$doc/TITLE}%3C/test%3E I have 3 results that are not displayed as usual in my FF browser (I=20 have a blank screen but source code is the following ) : <?xml version=3D"1.0" encoding=3D"UTF-8"?> <exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20 exist:hits=3D"3" exist:start=3D"1" exist:count=3D"3"><test><TITLE>The Tra= gedy=20 of Romeo and Juliet</TITLE></test><test><TITLE>The Tragedy of Hamlet,=20 Prince of Denmark</TITLE></test><test><TITLE>The Tragedy of=20 Macbeth</TITLE></test></exist:result> If I try to read this with cocoon with the following : <map:match pattern=3D"getTest"> <map:generate=20 src=3D"http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20ex= ist:serialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[cont= ains(TITLE,'Tragedy')]%20return%20%3Ctest%3E%3Cone%3E{$doc/TITLE}%3C/one%= 3E%3C/test%3E"/> <!--map:transform src=3D"stylesheets/identity.xsl"/-->=20 <map:serialize type=3D"xml"/> </map:match> Then the content disappears. I obtain a blank screen with the following=20 source code : <?xml version=3D"1.0" encoding=3D"UTF-8"?> <exist:result xmlns:exist=3D"http://exist.sourceforge.net/NS/exist"=20 exist:hits=3D"3" exist:start=3D"1"=20 exist:count=3D"3"><test/><test/><test/></exist:result> I can't say if it's Exist or Cocoon's fault. For example, if I write $adoc instead of $doc inside the braces, no=20 error happens. Very strange. Any ideas ? Michael Beddow a =E9crit : >>I tried to execute xquery functions. Because I didn't succeed in writin= g >> xqueries with parameters (and util:eval is too long), I decided to >>generate my xquery with an xsl. >> >=20 > You mean you pass parameters into an xslt transform, which uses those > parameters to "hard-code" an Xquery with the values you require, which = you > then pass to eXist to be executed, after which you again invoke another= xslt > transform on the XQuery result, but which terminates with an error, no > matter what the content of that transform? If so, I assume we are talk= ing > about a Cocoon pipeline (since if you were building your XQueries in na= tive > Java, you wouldn't need XSLT to parameterise them). If so the problem m= ay > not actually be an eXist one. >=20 >=20 >>It works well. Exist generates the result I want. But, when I want to >>transform my xquery results, with a plain identity transformation, for >>example, I get an error (java.lang.RuntimeException). >=20 >=20 > I'm afraid that error tells us nothing at all. We need to see more of t= he > stacktrace to know where the exception is happening. >=20 >=20 >>If I delete the >>identity tranformation, everything is ok :-( >=20 >=20 > Do you actually mean delete the identity transformation from the xslt s= heet, > or do you mean if you don't invoke the xslt on the result set at at all= ? >=20 >=20 >>I use 1.0b2-build-1107 >> >=20 > Pretty ancient stuff by now, but as I say this may not be an eXist prob= lem > as such. >=20 > Michael Beddow >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: GoToMeeting - the easiest way to collabor= ate > online with coworkers and clients while avoiding the high cost of trave= l and > communications. There is no equipment to buy and you can meet as often = as > you want. Try it free.http://ads.osdn.com/?ad_id=3D7402&alloc_id=3D1613= 5&op=3Dclick > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open --=20 Jean-Christophe Kermagoret jck@BabelObjects.Com |