Loading TOC...

xdmp:document-properties

xdmp:document-properties(
   [$uri as xs:string*]
) as document-node()*

Summary

Returns a sequence of properties documents, one for each of the specified documents that has a corresponding properties document. If no documents are specified, returns a sequence of properties documents for all documents in the database that have a corresponding properties document.

Parameters
$uri A sequence of document URIs.

Example

  xdmp:document-properties("/mydoc.xml")
  =>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
  <cpf:processing-status xmlns:cpf="http://marklogic.com/cpf">done
    </cpf:processing-status>
  <cpf:last-updated xmlns:cpf="http://marklogic.com/cpf">
    2010-05-24T16:28:11.577608-07:00</cpf:last-updated>
  <cpf:state xmlns:cpf="http://marklogic.com/cpf">
    http://marklogic.com/states/final</cpf:state>
  <prop:last-modified>2010-05-24T16:29:58-07:00</prop:last-modified>
</prop:properties>

Example

xdmp:document-properties()
 => All of the document properties, for example:
    <prop:properties
          xmlns:prop="http://marklogic.com/xdmp/property">
    Property Node1
    </prop:properties>
    <prop:properties
          xmlns:prop="http://marklogic.com/xdmp/property">
    Property Node2
    </prop:properties>
    <prop:properties
          xmlns:prop="http://marklogic.com/xdmp/property">
    Property NodeN
    </prop:properties>

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • Is it possible to delete a node in a specific forest? The reason I ask is that we somehow ended up with duplicate property nodes ... one in each forest of a database. And we need to delete all but one of them.
  • Hi , Is it possible to add properties from one file(say A.xml) to another file (say A.pdf) PROPERTIES?
  • you may also remove the entire properties document by performing a xdmp:node-delete() on it, as the following example illustrates xdmp:node-delete( xdmp:document-properties($uri) ) where $uri is the $uri of your doc