Hello,
I am using the eXist GET REST interface, to fetch suggestions for an auto-complete widget. However, eXist returns the results with a content-type of "text/html", which, I suppose, automatically triggers HTML Tidy. For example, when the suggestions are returned as : <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist" exist:hits="2" exist:start="1" exist:count="2"> <Transporteur> <NomCourt>Cars Dussert</NomCourt> <NomComplet>Cars Dussert</NomComplet> </Transporteur> </exist:result> Here's what I can read in the log file : line 1 column 1 - Error: <exist:result> is not recognized! line 1 column 114 - Error: <transporteur> is not recognized! line 1 column 212 - Error: <nomcourt> is not recognized! line 1 column 245 - Error: <nomcomplet> is not recognized! This document has errors that must be fixed before using HTML Tidy to generate a tidied up version. Where should this problem be fixed ? In eXist or OPS ? For the moment, I've found a solution, by forcing eXist to returned everything as "text/xml" -- which requires to recompile Java code. By the way, how could I use the *POST* REST interface of eXist ? Which set of OPS processors do I have use in my XPL ? I'm a bit lost with all these processors :) Because I've seen that the eXist REST POST interface returns data as "text/xml". So that would solve my problem, and I wouldn't have to URL-encode my XQuery anymore ! Cheers, -- Damiano ALBANI -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Damiano,
I have not seen eXist return text/html recently, so I am not sure why this is happening. Maybe eXist actually returns an error, which would explain why it is returned as HTML? You can use the eXist REST API entirely from XForms if you wish so, with xforms:submission: GET, POST, PUT and DELETE are all supported. From XPL, we have a pipeline called submit.xpl which wraps the same XForms functionality as an XPL pipeline. You may want to give that a try. I think there was a message on this topic not that long ago in ops-users about using submit.xpl, but I can't find it just right now. -Erik Damiano Albani wrote: > Hello, > > I am using the eXist GET REST interface, to fetch suggestions for an > auto-complete widget. > However, eXist returns the results with a content-type of "text/html", > which, I suppose, automatically triggers HTML Tidy. > > For example, when the suggestions are returned as : > > <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist" > exist:hits="2" exist:start="1" exist:count="2"> > <Transporteur> > <NomCourt>Cars Dussert</NomCourt> > <NomComplet>Cars Dussert</NomComplet> > </Transporteur> > </exist:result> > > Here's what I can read in the log file : > > line 1 column 1 - Error: <exist:result> is not recognized! > line 1 column 114 - Error: <transporteur> is not recognized! > line 1 column 212 - Error: <nomcourt> is not recognized! > line 1 column 245 - Error: <nomcomplet> is not recognized! > This document has errors that must be fixed before > using HTML Tidy to generate a tidied up version. > > Where should this problem be fixed ? In eXist or OPS ? > > For the moment, I've found a solution, by forcing eXist to returned > everything as "text/xml" -- which requires to recompile Java code. > > By the way, how could I use the *POST* REST interface of eXist ? Which > set of OPS processors do I have use in my XPL ? I'm a bit lost with > all these processors :) > Because I've seen that the eXist REST POST interface returns data as > "text/xml". So that would solve my problem, and I wouldn't have to > URL-encode my XQuery anymore ! > > Cheers, > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Damiano Albani-2
Damiano, Erik,
Here is the link : http://mail-archive.objectweb.org/ops-users/2006-05/msg00218.html -----Message d'origine----- De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez Envoyé : vendredi 21 juillet 2006 14:36 À : [hidden email] Objet : Re: [ops-users] eXist REST content-type issue Damiano, I have not seen eXist return text/html recently, so I am not sure why this is happening. Maybe eXist actually returns an error, which would explain why it is returned as HTML? You can use the eXist REST API entirely from XForms if you wish so, with xforms:submission: GET, POST, PUT and DELETE are all supported. From XPL, we have a pipeline called submit.xpl which wraps the same XForms functionality as an XPL pipeline. You may want to give that a try. I think there was a message on this topic not that long ago in ops-users about using submit.xpl, but I can't find it just right now. -Erik Damiano Albani wrote: > Hello, > > I am using the eXist GET REST interface, to fetch suggestions for an > auto-complete widget. > However, eXist returns the results with a content-type of "text/html", > which, I suppose, automatically triggers HTML Tidy. > > For example, when the suggestions are returned as : > > <exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist" > exist:hits="2" exist:start="1" exist:count="2"> <Transporteur> > <NomCourt>Cars Dussert</NomCourt> > <NomComplet>Cars Dussert</NomComplet> </Transporteur> > </exist:result> > > Here's what I can read in the log file : > > line 1 column 1 - Error: <exist:result> is not recognized! > line 1 column 114 - Error: <transporteur> is not recognized! > line 1 column 212 - Error: <nomcourt> is not recognized! > line 1 column 245 - Error: <nomcomplet> is not recognized! > This document has errors that must be fixed before using HTML Tidy to > generate a tidied up version. > > Where should this problem be fixed ? In eXist or OPS ? > > For the moment, I've found a solution, by forcing eXist to returned > everything as "text/xml" -- which requires to recompile Java code. > > By the way, how could I use the *POST* REST interface of eXist ? Which > set of OPS processors do I have use in my XPL ? I'm a bit lost with > all these processors :) Because I've seen that the eXist REST POST > interface returns data as "text/xml". So that would solve my problem, > and I wouldn't have to URL-encode my XQuery anymore ! > > Cheers, > > > ---------------------------------------------------------------------- > -- > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: > http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
On 7/21/06, [hidden email] <[hidden email]> wrote:
> Damiano, Erik, > > Here is the link : > http://mail-archive.objectweb.org/ops-users/2006-05/msg00218.html Thanks a lot ! -- Damiano ALBANI -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |