File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.smart-mastering/impl Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,14 @@ declare function util-impl:properties-to-values-functions(
153153 let $qname := fn:QName (fn:string ($namespace), fn:string ($property-title))
154154 return
155155 function ($document) {
156- $document/(es:envelope|envelope)/(es:instance |instance )/*/*[fn:node-name (.) eq $qname]
156+ let $is-json := (xdmp:node-kind ($document) = "object" or fn:exists ($document/(object-node ()|array-node ())))
157+ let $qname:=
158+ if ($is-json)
159+ then
160+ fn:QName ("" , fn:string ($property-title))
161+ else
162+ $qname
163+ return $document/(es:envelope|envelope)/(es:instance |instance )/*/*[fn:node-name (.) eq $qname]
157164 }
158165 else if (fn:exists ($document-xpath-rule)) then
159166 let $xpath := fn:head (($document-xpath-rule/(@path|path),$property-name))
You can’t perform that action at this time.
0 commit comments