Hi all
I'm using the REST API for eXist with submissions like this one : <xforms:submission id="update-exist" ref="instance('update-instance')" action="/exist/rest/test" method="post" replace="none"> The query instance : <xforms:instance id="update-instance"> <exist:query> <exist:text/> </exist:query> </xforms:instance> I'm building the request with that kind of code : <xforms:setvalue ref="instance('update-instance')/exist:text" value="concat('update replace //MyNode with ', xxforms:serialize(instance('data')/*, 'html') )"/> 1/ Why have I to use 'html' method for the serialization (the 'xml' doesn't work, not the serialization but the submission) ? 2/ What's the difference between the xxforms:serialize and the saxon:serialize method ? 3/ With the 'html' method the serialization failed when there is a node called <param>. Why ? TIA, Happy New Year 2007 ! -- Marc -- 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
|
marc wrote:
> Hi all > > I'm using the REST API for eXist with submissions like this one : > <xforms:submission id="update-exist" ref="instance('update-instance')" > action="/exist/rest/test" method="post" replace="none"> > > The query instance : > <xforms:instance id="update-instance"> > <exist:query> > <exist:text/> > </exist:query> > </xforms:instance> > > I'm building the request with that kind of code : > <xforms:setvalue ref="instance('update-instance')/exist:text" > value="concat('update replace //MyNode with ', > xxforms:serialize(instance('data')/*, 'html') )"/> > > 1/ Why have I to use 'html' method for the serialization (the 'xml' > doesn't work, not the serialization but the submission) ? > 2/ What's the difference between the xxforms:serialize and the > saxon:serialize method ? None. > 3/ With the 'html' method the serialization failed when there is a node > called <param>. Why ? I am not sure, but HTML serialization is not meant to serialize any random XML document. So the problem may come from there. Can you build a simple reproduciable case for the sandbox? > Happy New Year 2007 ! Same to you! -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Eric,
>> >> 1/ Why have I to use 'html' method for the serialization (the 'xml' >> doesn't work, not the serialization but the submission) ? > > > That I don't know. 'xml' *should* work! With the 'xml' serialization there is the xml déclaration (<?xml version="1.0" encoding="utf-8"?>) and the expression "update replace MyPath with <?xml version="1.0" encoding="utf-8"?><root>...</root>" does not work with the eXist submission ("update replace MyPath with <root>...</root>" works) > >> 3/ With the 'html' method the serialization failed when there is a >> node called <param>. Why ? > > > I am not sure, but HTML serialization is not meant to serialize any > random XML document. So the problem may come from there. > > Can you build a simple reproduciable case for the sandbox? Do you want a reproduciable case for the eXist submission or for the 'html' serialization ? -- Marc -- 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
|
marc wrote:
> With the 'xml' serialization there is the xml déclaration (<?xml > version="1.0" encoding="utf-8"?>) and the expression > > "update replace MyPath with <?xml version="1.0" > encoding="utf-8"?><root>...</root>" > > does not work with the eXist submission ("update replace MyPath with > <root>...</root>" works) I see. In fact the Saxon doc says that "In non-XSLT environments, the second argument may be the name of the output method (xml, html, xhtml, text), written as a string literal. In this case the other serialization parameters are defaulted." So we can't control the production of the XML declaration. That is, unless we use the second interface, which is: saxon:serialize($node as node(), $format as element(xsl:output)) If we managed to pass an xsl:output element, then we could control the details of the serialization. Or, maybe we just need to create another xxforms:serialize() function with additional parameters instead, or a reference to an "xxforms:output" element. > Do you want a reproduciable case for the eXist submission or for the > 'html' serialization ? Well I am pretty convinced that neither of those will work at the moment and that what we need is a way to serialize XML without the XML declaration. I entered an RFE: http://forge.objectweb.org/tracker/index.php?func=detail&aid=306561&group_id=168&atid=350207 But as a workaround, you can use xxforms:serialize() and then to a substring that removes the XML declaration before sending to eXist, right? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Erik Bruchez a écrit :
> Well I am pretty convinced that neither of those will work at the > moment and that what we need is a way to serialize XML without the XML > declaration. I entered an RFE: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=306561&group_id=168&atid=350207 > > > But as a workaround, you can use xxforms:serialize() and then to a > substring that removes the XML declaration before sending to eXist, > right? Of course, I should have thought about the substring method... -- Marc -- 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 |