Gary,

I think the problem is due to the tokenization of the value.  If you can 
cts:tokenize against the string you will determine which characters are treated 
as tokens.  

declare namespace html = "http://www.w3.org/1999/xhtml";;
let $obj :=  json:object() 
return (
  cts:tokenize("[Folders].[Orders].[OrderDate]") ! 
map:put($obj,.,xdmp:describe(.)),
  $obj
 )

Returns 
{
"[": "cts:punctuation("[")",
"Folders": "cts:word("Folders")",
"]": "cts:punctuation("]")",
".": "cts:punctuation(".")",
"Orders": "cts:word("Orders")",
"OrderDate": "cts:word("OrderDate")"
}

let $node := <a><p>[Folders].[Orders].[OrderDate]</p></a>
return 
cts:contains($node,cts:element-value-query(xs:QName("p"),"Folders.Orders.OrderDate",("punctuation-insensitive")))
[returns]
True

let $node := <a><p>[Folders].[Orders].[OrderDate]</p></a>
return 
cts:contains($node,cts:element-value-query(xs:QName("p"),"Folders.Orders.OrderDate",("punctuation-sensitive")))
[returns]
False

Starting from ML7 you can control the tokenization of string values and how 
they are treated

http://docs.marklogic.com/admin:database-tokenizer-override

http://docs.marklogic.com/guide/search-dev/custom-tokenization#id_80979

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

Reply via email to