Puneet Pant
Puneet Pant

Reputation: 948

How to get uploaded document names in Marklogic Server?

I am uploading some office 2007/2010 documents in Marklogic Server. Now the content processor will generate corresponding xhtml and html files. I want to get the uploaded document names in Marklogic Server through xquery (except xml, xhtml and html files). To make my question more clear here is an example. If I have uploaded one docx and one pdf in Marklogic then I want to run such xquery which will give me names of these two uploaded documents. How can I do this ?

Upvotes: 1

Views: 182

Answers (1)

Clark Richey
Clark Richey

Reputation: 392

MarkLogic doesn't automatically store the document name. Documents are uniquely identified by a URI which may or may not be wholly or partially comprised of the document name. The document URI is determined programmatically when you upload your document. If you are placing the document name into the URI then you could parse it back out of the URI. IF you are not doing this, then you need to capture and store the document name either as part of the metadata in the document itself or perhaps as an associated property fragment.

Upvotes: 2

Related Questions