Re: [xslt] Win2K,xsltproc ignores catalog



Hi Peter,

On Mon, 17 Feb 2003, Peter Jacobi wrote:
> Daniel, Wim, All,
>
> >   No my conclusion is that your C library handles
> >      C:/XSherLock0.1/art500/art500.dtd
> > and  C:\XSherLock0.1/art500/art500.dtd
> > differently, which might be perfectly sensible.
>
> Hoping to clarify something (but fearing, that confusion
> will win), I can assure you that WinNT and offspring
> will happily take any mixture of forward and backward
> slashes in the API calls. Just tested with OpenFile.
>
> Also the default shell cmd.exe will take any mixture
> of forwward and backward slashes, but you have to
> enclose the argument in double quotes to disable the
> special meaning of / as option delimiter.
>
> This is no guarantee, that a malicious compiler will
> not enforce tighter restrictions, but I would guess, that
> the problem is in another area.


No, the compiler can do little there, because it must link to the c-runtime
and that one will handle everything internally.

You are right, the problem is elsewhere. I experimented a bit and found an
annoying thing.

Imagine you have a catalog and a DTD somewhere on the disc:

  c:\cat\some.xml
  c:\dtd\some.dtd

The catalog (c:\some\cat.xml) having a:

  [...]
  <public publicId="-//what//ever//en" uri="../dtd/some.dtd"/>
  [...]

entry, which specifies a relative URI. Now you can set your
XML_CATALOG_FILES to point to this catalog and you'll have the local
resource for that -//what//ever//en.

If you specify the location of the catalog using the URI notation, like
XML_CATALOG_FILES=file:///c:/cat/some.xml, then everything works as
expected, the DTD is found relative to the catalog file.

If you however specify the path to the catalog using the filesystem
notation, means XML_CATALOG_FILES=c:\cat\some.xml, and then run
xmllint --valid on some file which refers to the -//what//ever//en, then the
library looks for the DTD relative to the directory from which you started
xmllint, not relative to the location of the catalog.

Time to consult the wisdom of the debugger :-)

Ciao,
Igor



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