[xml] Catalog file resolution



This is a problem related to AxKit, but I figure it might be relevant to
others with "psuedo document roots", e.g. in a web environment...

First let me explain why we have this problem:

Currently, AxKit uses libxml2's callback mechanism to read in files. We do
this because the web has a different root to usual filesystem stuff. So
when you request /foo/bar.xml, it's looked up at the web root, not the
filesystem root. The reason we do this is so that server-side rendered
files get processed the same way client side rendered ones would.

The problem arises when catalog support is enabled. Now catalog support is
a good thing, so I don't want to turn it off. The problem is the callbacks
see a request for "/etc/xml/catalog", and try and resolve it from the web
root.

A fix for us, assuming it wouldn't break things for others, would be to
send the callbacks "file:///etc/xml/catalog", which we treat as filesystem
relative.

Any chance we can get a patch into libxml2 to do that? Or would it break
stuff?

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]