How to add a range index of elements to native colon JSON

I am trying to add a range index in the Native JSON property that has a colon (:) in its name in MarkLogic Server.

Sample data is as follows.

{ "Aspects": { "xbrl28:TransactionTime": "2014-08-13T00:00:00+0000", "xbrl28:Archive": "S1002U7K", "xbrl:Period": "2014-08-13" }, "_id": "27948e6d-a774-49ee-8e30-668cc4731975" } 

When I tried to add the range index to "xbrl28: Archive", but I can not, because "xbrl28:" was considered as a namespace prefix. Is there a way to avoid the colon?

+5
source share
1 answer

You cannot use element range indices for JSON properties with colons, spaces, or any other name that does not match xs: QName. I have not tried it, but you can try to use a path index with an expression like: node()[name() = "xbrl28:Archive"] or better: text("xbrl28:Archive") .

NTN!

+5
source

Source: https://habr.com/ru/post/1244791/


All Articles