
op:doc-cols( [$qualifier as xs:string?], [$names as item()*] ) as item()+
Constructs a document column identifier object for columns of uri, doc, collections, metadata, permissions, quality and temporalCollection. The document column identifier object can be passed to the op:join-doc-cols or op:write.
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
op:from-doc-uris(cts:word-query("tiger", ("case-sensitive")), "A")
=>op:join-doc-cols(op:doc-cols("A", ("uri", "doc", "collections")), op:view-col("A", "uri"))
=>op:order-by(op:view-col("A", "uri"))
=>op:result()
xquery version "1.0-ml";
import module namespace op="http://marklogic.com/optic"
at "/MarkLogic/optic.xqy";
declare option xdmp:update "true";
let $doc-descriptors := (
map:entry("uri", '/optic/update/write1.xml')
=>map:with("collections", ("overwrite","overwrite10")),
map:entry("uri", '/optic/update/write2.xml'),
map:entry("uri", '/optic/update/write3.xml')
=>map:with("collections", ("overwrite","overwrite12"))
)
return op:from-doc-descriptors($doc-descriptors)
=>op:order-by("uri")
=>op:write(op:doc-cols((), ("uri","doc","collections")))
=>op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.