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