On 3 March 2010 18:31, Wyatt VanderStucken <[email protected]> wrote:
> I've been banging my head trying to figure this out - any ideas would be
> much appreciated....
>
> let $ex as xs:string := '<exception message="One of
> ''{"http://www.w3.org/1998/Math/MathML":semantics}'' is
> expected."/>'
> return xdmp:unquote($ex)
>
> Always gives error "SystemID: XDMP-DOCSTARTTAGCHAR: xdmp:unquote("<exception
> message="One of '{"http://www.w3.org/1998/M...") -- Unexpected
> character "/" in start tag at line 1"
That's because " gets resolved to " when the query is parsed, so
your variable $ex becomes:
<exception message="One of '{"http....
..you can see the double quotes that are causing the exception when
you try and parse that as XML using xdmp:unquote.
One answer is to double escape them:
message="One of ''{&quot;
..then after the query is parsed you are left with """ as expected.
cheers
andrew
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general