Re: [xml] Whitespace in Public IDs
- From: Daniel Veillard <veillard redhat com>
- To: Peter Breitenlohner <peb mppmu mpg de>
- Cc: xml gnome org
- Subject: Re: [xml] Whitespace in Public IDs
- Date: Fri, 16 Jul 2004 05:02:52 -0400
On Fri, Jul 16, 2004 at 10:42:10AM +0200, Peter Breitenlohner wrote:
On Wed, 14 Jul 2004, Peter Breitenlohner wrote:
(3) A question: I suspect a Public Identifier containing whitespace only
thus normalized to the empty string should be interpreted as NULL. Correct?
Actually I don't know, really. It think this should work fine
in practice because if the public ID is "" it won't match anything
in the catalog, and hence one should fallback to the system identifier.
But there is no explicit rule that an empty public ID should be ignored.
I would say it sounds good enough and if someone has a problem with this
they should raise it when it occurs.
attached 2 patches for "Public Identifier Normalization", please have a
The question (3) above still needs an answer. The present version of
xmlCatalogNormalizePublic replaces pubID's that are empty (or just
whitespace) by an empty string which is subsequently replaced by NULL. I
think the semantics of such pubID's is rather dubious; the only important
aspect probably is not to produce segmentation faults or memory leaks.
The first patch is for the code change in catalog.c
The second one contains two additional tests ("whitex" for an XML catalog
"whites" for an SGML catalog) that I have used for testing. Please either
add them to the distribution, or incorporate them into the existing tests (I
didn't want to modify them), or just ignore them -- as you prefer.
Okay, both patches looks good to me, applied and commited !
thanks a lot,
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
] [Thread Prev