xdmp:unqote and cts:query($qNode/*) from the generated node
Issues related to W3C XQuery.
-
- Posts: 21
- Joined: Sat Jan 07, 2017 12:54 am
xdmp:unqote and cts:query($qNode/*) from the generated node
let $query:=<cts:path-range-query xmlns:cts="http://marklogic.com/cts" operator="≤"><cts:path-expression>processInstance/tasks/task/auditTask/createdOn </cts:path-expression> <cts:value xsi:type="xs:dateTime" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan ... /cts:value> </cts:path-range-query>
This xml got generated when I serialized my xquery. I am having problem with the operator="≤". when I do xdmp:unquote, and then do a let $colQuery as cts:query :=cts:query($qNode/*)
it gives error about invalid operation. since the expected string is "<=" and not ascii version of it.
how does one deal with doing xdmp:unquote of a string that has less than or greater than chars and the use the resulting node to create a cts:query?
Please any help would be greatly appreciated.
This xml got generated when I serialized my xquery. I am having problem with the operator="≤". when I do xdmp:unquote, and then do a let $colQuery as cts:query :=cts:query($qNode/*)
it gives error about invalid operation. since the expected string is "<=" and not ascii version of it.
how does one deal with doing xdmp:unquote of a string that has less than or greater than chars and the use the resulting node to create a cts:query?
Please any help would be greatly appreciated.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: xdmp:unqote and cts:query($qNode/*) from the generated node
Post by alex_jitianu »
Hi,
If I understand it correctly, you have a query like this:
and you get an error like this:
I managed to reproduce this behavior myself but unfortunately I don't know how to fix it. I think a better place to ask this question is on the MarkLogic list (general@developer.marklogic.com) because the people there have more experience with MarkLogic. If you get an answer it might be good to post it here as well to help those that bump into it in the future.
Best regards,
Alex
If I understand it correctly, you have a query like this:
Code: Select all
let $query:=
'<cts:path-range-query xmlns:cts="http://marklogic.com/cts" operator="≤">
<cts:path-expression>processInstance/tasks/task/auditTask/createdOn </cts:path-expression>
<cts:value
xsi:type="xs:dateTime"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2017-04-25T23:59:59</cts:value>
</cts:path-range-query>'
let $contents := xdmp:unquote($query, "", "repair-full")
return cts:query($contents/*)
Code: Select all
XDMP-ARG: cts:query(<cts:path-range-query operator="≤" xmlns:cts="http://marklogic.com/cts">...</cts:path-range-query>) -- op is invalid
Best regards,
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service