|
From: Jean-Christophe K. <jc...@ba...> - 2005-05-27 09:16:22
|
Shame on me...
I completely forgot that {} are interpreted by cocoon so I put %7B and=20
%7D instead and all is fine now...
Maybe it should be a good idea to point out this ?
Anyway, thanks for this amazing tool :-)
Jean-Christophe
Jean-Christophe Kermagoret a =E9crit :
> Thanks for your answer.
> You're right, I work with Cocoon.
>=20
> If I try this :
>=20
> http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20exist:s=
erialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[contains(=
TITLE,'Tragedy')]%20return%20%3Ctest%3E{$doc/TITLE}%3C/test%3E=20
>=20
>=20
> 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 ) :
>=20
> <?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 T=
ragedy=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>
>=20
> If I try to read this with cocoon with the following :
>=20
> <map:match pattern=3D"getTest">
> <map:generate=20
> src=3D"http://localhost:8088/db/shakespeare/plays?_query=3D(::pragma%20=
exist:serialize%20omit-xml-declaration=3Dno::)for%20$doc%20in%20//PLAY[co=
ntains(TITLE,'Tragedy')]%20return%20%3Ctest%3E%3Cone%3E{$doc/TITLE}%3C/on=
e%3E%3C/test%3E"/>=20
>=20
> <!--map:transform src=3D"stylesheets/identity.xsl"/-->
> <map:serialize type=3D"xml"/>
> </map:match>
>=20
> Then the content disappears. I obtain a blank screen with the following=
=20
> source code :
>=20
> <?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>
>=20
> I can't say if it's Exist or Cocoon's fault.
>=20
> For example, if I write $adoc instead of $doc inside the braces, no=20
> error happens. Very strange.
>=20
> Any ideas ?
>=20
>=20
> Michael Beddow a =E9crit :
>=20
>>> I tried to execute xquery functions. Because I didn't succeed in writ=
ing
>>> xqueries with parameters (and util:eval is too long), I decided to
>>> generate my xquery with an xsl.
>>>
>>
>> You mean you pass parameters into an xslt transform, which uses those
>> parameters to "hard-code" an Xquery with the values you require, which=
=20
>> you
>> then pass to eXist to be executed, after which you again invoke=20
>> 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=20
>> talking
>> about a Cocoon pipeline (since if you were building your XQueries in=20
>> native
>> Java, you wouldn't need XSLT to parameterise them). If so the problem =
may
>> not actually be an eXist one.
>>
>>
>>> It works well. Exist generates the result I want. But, when I want to=
>>> transform my xquery results, with a plain identity transformation, fo=
r
>>> example, I get an error (java.lang.RuntimeException).
>>
>>
>>
>> I'm afraid that error tells us nothing at all. We need to see more of =
the
>> stacktrace to know where the exception is happening.
>>
>>
>>> If I delete the
>>> identity tranformation, everything is ok :-(
>>
>>
>>
>> Do you actually mean delete the identity transformation from the xslt =
>> sheet,
>> or do you mean if you don't invoke the xslt on the result set at at al=
l?
>>
>>
>>> I use 1.0b2-build-1107
>>>
>>
>> Pretty ancient stuff by now, but as I say this may not be an eXist=20
>> problem
>> as such.
>>
>> Michael Beddow
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is sponsored by: GoToMeeting - the easiest way to=20
>> collaborate
>> online with coworkers and clients while avoiding the high cost of=20
>> travel and
>> communications. There is no equipment to buy and you can meet as often=
as
>> you want. Try it=20
>> free.http://ads.osdn.com/?ad_id=3D7402&alloc_id=3D16135&op=3Dclick
>> _______________________________________________
>> Exist-open mailing list
>> Exi...@li...
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>=20
>=20
>=20
--=20
Jean-Christophe Kermagoret
jc...@Ba...
|