Hi all,
I've run into an issue with the parsing of quotes in using the XQuery processor (with eXist). What I'm trying to do is take a URL parameter with a list of IDs, and then aggregate the XML documents matching these IDs into a batch response. It works fine, except if one of the documents has an element which contents a double quote within its text. I get the following error:
'The reference to entity "quot" must end with the ';' delimiter.'
This is a fairly easy problem to reproduce. It can be reproduced by making some slight changes to the example at
http://wiki.orbeon.com/forms/doc/developer-guide/processors-xquery-generator#TOC-Query-and-parameters by replacing the query and parameter with the following:
<query><![CDATA[declare variable $x as xs:string external;
<xml> { $x } </xml>
]]></query>
<parameter>
<name>x</name>
<value>"Hello world!"</value>
</parameter>
If you add quotes around the parameter value and wrap $x with XML tags in the query, the error will occur. My own XQuery functions correctly if it is stored and executed directly within eXist. What is the Orbeon processor doing under the hood? As a workaround, I could use the URL generator processor to ping the xql file stored in the eXist database, but I would rather use the Orbeon XQuery processor, because I think it's easier to maintain in XPL.
Thanks,
Ethan
--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].