On Tue, Feb 14, 2012 at 14:06, Liam R E Quin <[email protected]> wrote: > On Tue, 2012-02-07 at 14:08 +0100, Nikolai Weibull wrote: >> What is going wrong here? (Example files minimized to show the problem.)
> It looks like there are some bugs, however... >> >> a.dtd: >> <!ENTITY % a PUBLIC "-//a//b//c" ""> > > so the SYSTEM identifier of %a is actually "a.dtd", and system > identifers override public ones, so %a; includes a.dtd. I don't think > this is a bug. Well, I did add prefer="public" to the catalog in my follow-up, so it should be preferring the public identifier, but it’s not. > The bug that I see is that if your system identifier is "-//a//b//c" > then xmllint doesn't obey the rewrite rule in the catalog, but tries to > open a file called "-/a/b/c" -- probably it is doing hierarchical URI > canonicalisation *before* checking the catalog. "-//a//b//c" is a public identifier, not a system identifier, so I don’t see how any of this is correct. > In general, stay away from XML public identifiers if you can. They were > a mistaken feature in the spec, not needed at all, and will only cause > you problems! I wish it were that simple. The problem is that this is something that occurs in a client’s files. I currently have to manually (well, outside of the XML tool-chain, anyway) modify their files before processing them. _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
