Hi,
Thanks for the prompt reply. I have set catalog file using GUI and tried firing following query.
Catalog File ::
<?xml version="1.0"?> <catalog prefer="system" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteSystem systemIdStartString="http://" rewritePrefix="file:///D:/local_repo/http/" /> </catalog>
and Trying to load file by executing
doc("http://abc.com/example.xml"),
But it is not able to load document as it seems it is not referring my catelog file.
Thanks, Anky
On 5 August 2015 at 18:35, Christian Grün christian.gruen@gmail.com wrote:
Hi Anky,
just write a simple resolver in XQuery. This is a simple example how to do it:
declare variable $BASE := "c:\documents\repo"; declare function local:resolve($url) { $BASE || replace($url, 'http://', '') }; doc(local:resolve("http://abc.com/example.xml"))
Cheers, Christian
On Wed, Aug 5, 2015 at 3:00 PM, ankit kumar anky4bugs@gmail.com wrote:
Hi,
I want to load document having a http url from local cache directory. Is there a way i can resolve http url to my local cache directory. For
example
let $file := doc("http://abc.com/example.xml")
should resolve example.xml from c:\documents\repo\http\abc.com
\example.xml
Thanks, Anky