Hey Danny,

When I try it it works fine for me.  mlcp 1.3-3 and 8.0-5.  Here's the command 
I ran:

mlcp.bat export -host localhost -database Modules -port 8000 -username admin 
-password admin -mode local -output_file_path modules -directory_filter 
/marklogic.rest.transform/ -content_encoding system

Also, you asked if there is another way to programmatically extract the said 
files.  Here's a way to do it using the Java Client API.  Note the constructor 
for DatabaseClient specifies the "Modules" database as the third arg.

    DatabaseClient client =
        DatabaseClientFactory.newClient("localhost", 8000, "Modules", "admin", 
"admin", DIGEST);
    DocumentManager docMgr = client.newDocumentManager();
    boolean infinite = true;
    StructuredQueryDefinition query =
        new StructuredQueryBuilder().directory(infinite, 
"/marklogic.rest.transform/");
    int start = 1;
    DocumentPage results = docMgr.search(query, start);
    System.out.println("results.size()=[" + results.size()  + "]");
    for ( DocumentRecord result : results ) {
        String docContents = result.getContentAs(String.class);
        System.out.println("docContents=[" + docContents + "]");
    }



Sam Mefford
Senior Engineer
MarkLogic Corporation
[email protected]<mailto:[email protected]>
Cell: +1 801 706 9731
www.marklogic.com<http://www.marklogic.com>

This e-mail and any accompanying attachments are confidential. The information 
is intended
solely for the use of the individual to whom it is addressed. Any review, 
disclosure, copying,
distribution, or use of this e-mail communication by others is strictly 
prohibited. If you
are not the intended recipient, please notify us immediately by returning this 
message to
the sender and delete all copies. Thank you for your cooperation.


On 3/31/2016 1:28 PM, Danny Sinang wrote:
Hi,

Has anyone here tried to export Xquery files from the Modules database using 
MLCP ?

We tried the config below, but the files generated had numbers at the start and 
end


014392
xquery version "1.0-ml";

module namespace cds="http://www.company.org/cds";;

[2:04]
cds:replace-subject-id-with-value($updated-xpaths, $updated-doc)
   else
     $updated-doc
};
20

If MLCP can't do this properly, can anyone suggest another way to 
programmatically extract the said files ?

Regards,
Danny


export -host localhost -database Modules -port 8006 -username admin -password 
admin -mode local -output_file_path /Users/danny/Downloads/cds/ 
-directory_filter /cds/ -content_encoding system



_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to