By default, eXide serializes query results using the standard adaptive output method. Since the concat()
function returns a string, adaptive output wraps the strings in double quotes and escapes any double quotes within the string by doubling them. This explains the phenomenon you are seeing.
From the W3C spec linked above:
An instance of xs:string
, xs:untypedAtomic
or xs:anyURI
is serialized by enclosing the value in double quotation marks and doubling any quotes within the value.
If you would instead like to see your results without any such quote escaping, you can use the dropdown menu just above eXide's query output pane and select "Text Method" or "XML Method" instead.
eXide's documentation (viewable via Help > Documentation) explains its serialization feature and default setting as follows:
In 2.4.0, eXide jettisoned its longstanding “pretty-printing” library, now using eXist’s built-in serialization methods. This change means improved whitespace accuracy and speed when viewing your query results, and turns eXide into a serialization sandbox. By toggling the output methods via the “Output” dropdown menu, you can serialize query results not just as Adaptive, JSON, XML, or the old “direct” (rendered) method, but also as Text, HTML5, XHTML, XHTML5, and MicroXML. The new “Indent” checkbox lets you toggle whether query results are indented or not.
Finally, I should note that eXist has its own native XQuery engine, and eXide passes queries directly to eXist for execution, not to Saxon. eXist uses Saxon solely for XSLT - i.e., when you use the transform
module to invoke an XSLT from XQuery.