Ok, Thanks for the info it is what I guessed, but I note the "currently" :)

It would be good, long term, to look to matching the Saxon capabilties here
[1], part of which (xslt) are covered by this issue [2].

And related: I wonder sometimes about a "xmldb:" uri scheme and a custom
resolver that could be passed to 3rd party validation and transform
libraries to allow them to access BaseX db resources. I seem to remember a
number of issues on the list that could be related to the saving temp
copies of db resources to the file system as seems to occur currently.

No doubt this would be a big task, if it is even possible :)

/Andy

[1] http://www.saxonica.com/documentation9.5/sourcedocs/xml-catalogs.html
[2] https://github.com/BaseXdb/basex/issues/1405

On 25 September 2018 at 09:28, Christian Grün <christian.gr...@gmail.com>
wrote:

> Hi Andy,
>
> Currently, XML catalog files will only be evaluated by the XML parser,
> which will be called after the addressed resource has been located and
> retrieved. In other words: The specified catalog file will be
> evaluated indeed, but only for URIs that occur within the specified
> XML document:
>
>   fetch:xml('file.xml', map {
>     'catfile': '/path/to/catalog.xml',
>     'dtd': true()
>   })
>
> file.xml:
>   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "bla/blu.dtd">
>   <xml/>
>
> catalog.xml:
>   <catalog prefer="system" xmlns="urn:oasis:names:tc:
> entity:xmlns:xml:catalog">
>     <rewriteSystem systemIdStartString="bla/"
>       rewritePrefix="file:///path/to/dtd/" />
>   </catalog>
>
> Hope this helps (a little),
> Christian
>
>
> On Tue, Sep 18, 2018 at 11:13 PM Andy Bunce <bunce.a...@gmail.com> wrote:
> >
> > Hi,
> >
> > Using a recent 9.1 Beta on windows.
> > I create an XML catalog at c:\tmp\mycatalog.xml
> >
> > <catalog prefer="system" xmlns="urn:oasis:names:tc:
> entity:xmlns:xml:catalog">
> >   <uri
> >   name="http://nowhere.com/doc";
> >   uri="file:///c:/tmp/doc.xml" />
> > </catalog>
> >
> > Then in the GUI
> >
> > fetch:xml("http://nowhere.com/doc";,
> > map{"catfile": "C:\tmp\mycatalog.xml"}
> > )
> >
> > It goes to nowhere, I was hoping to get back c:/tmp/doc.xml
> > Should this work?
> >
> > /Andy
> >
>

Reply via email to