[xslt] libxml2-2.6.9 catalog handling: Public Identifier Normalization
- From: Peter Breitenlohner <peb mppmu mpg de>
- To: xslt gnome org
- Subject: [xslt] libxml2-2.6.9 catalog handling: Public Identifier Normalization
- Date: Thu, 22 Apr 2004 10:16:41 +0200 (CEST)
On Wed, 25 Feb 2004, Daniel Veillard wrote:
> On Wed, Feb 25, 2004 at 10:44:34AM +0100, Peter Breitenlohner wrote:
> > ....
>
> Hum, no, this is just a litteral transcription of the spec in section 7.1.1:
>
> -----------------------------------------
> If the system identifier is a URN in the publicid namespace, it is
> .....
> system identifier and proceeding with the original public identifier.
> -----------------------------------------
>
> .......
> The code could be optimized, or an error could be raised, but it's not
> wrong. Please consider reading the spec while reviewing the code, you
> can't really do the later without knowing the former.
Hi Daniel,
meanwhile I have read the specs and played a little bit with a way to build
catalogs for coexisting docbook-xml-4.* versions and the like. In doing so I
noticed that the existing libxml2 (<=2.6.9) does not obey section 6.2
(Public Identifier Normalization) of the specs:
-----------------------------------------
In order to accurately and interoperably compare public identifiers, catalog
processors must perform normalization on public identifiers in both the
catalog and the input passed to them.
All strings of white space in public identifiers must be normalized to
single space characters (#x20), and leading and trailing white space must
be removed.
-----------------------------------------
This is certainly not done in the present version, at least not as
implemented in the xmlcatalog application. I have tried:
xmlcatalog --shell
> public "-//OASIS//DTD DocBook XML V4.1.2//EN" => found
> public " -//OASIS//DTD DocBook XML V4.1.2//EN" => not found
> public "-//OASIS//DTD DocBook XML V4.1.2//EN " => not found
> public "-//OASIS//DTD DocBook XML V4.1.2//EN" => not found
and with analogous results if the catalog entries are modified instead of
the input.
If the `must' in the specs is interpreted as manatory requirement, the only
reliable way to do that probably is in catalog.c, even if that may be
awkward if temporary strings have to be created that are later to be freed
(by whom an when?).
regards
Peter Breitenlohner <peb@mppmu.mpg.de>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]