.opf is probably not recognized as an XML file type. Try to change the ingest 
to get it ingested as XML. You can force mlcp to load .opf as xml, or force the 
format when inserting the doc with xqy, but you can also add .opf as an xml 
format mime type. Then ML will not insert it as binary in the database.

Cheers

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Rajesh Kumar <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Thursday, November 3, 2016 at 12:52 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] epub - opf file to xml

Hi Dave,

I tried below code by creating rest instance in 8020 port and it worked fine. 
As i want to implement xpath on the opf content document-filter didn't work for 
me eventhough it converted to xhtml format.

Code snippet:
xdmp:document-get("http://xxxx:8020/v1/documents?uri=/epub/sample/OPS/package.opf";,
       <options xmlns="xdmp:document-get" xmlns:http="xdmp:http">
           <repair>full</repair>
           <format>xml</format>
           <http:authentication>
              <http:username>xxxx</http:username>
              <http:password>xxxx</http:password>
           </http:authentication>
       </options>)

Thanks for your response.

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

Reply via email to