I can't change the value of $ex, in the actual code this comes from a web-service call...

On 3/3/2010 2:14 PM, Andrew Welch wrote:
Thanks for the suggestion...  I agree that's the issue, but I'm not quite
sure how to work around it.  I've tried the following to no avail - how do I
replace the&  with&? (unfortunately, I can't change the value of $ex,
this comes from web-service call)...

let $ex as xs:string := '<exception message="One of
''{&quot;http://www.w3.org/1998/Math/MathML&quot;:semantics}'' is
expected."/>'
return
    xdmp:unquote(
        replace($ex, "&","&amp;")
    )
No it would be:

let $ex as xs:string := '<exception message="One of
''{&amp;quot;http://www.w3.org/1998/Math/MathML&amp;quot;:semantics}''
is expected."/>'
return xdmp:unquote($ex)

The entity reference&quot; needs to be double escaped to&amp;quot;
so that once the query has been parsed by the query processor, the
&amp; entity ref is resolved to&, creating the&quot; ref ready to be
parsed again using xdmp:unquote.





_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to