Re: [xml] Whitespace in Public IDs (was: libxml2-2.6.11 -- 1. gcc warning...)



On Fri, Jul 09, 2004 at 04:27:52PM +0200, Peter Breitenlohner wrote:
On Fri, 9 Jul 2004, Daniel Veillard wrote:

On Thu, Jul 08, 2004 at 10:12:33AM +0200, Peter Breitenlohner wrote:
-----------------------------------------
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.
-----------------------------------------
[...]
Hum, right. Basically all public entry point using Public ID should be
patched to check this and if needed a new string should be allocated.
That would need a new function for this, and a few more line in all those
functions ... Not very hard but admitedly boring :-)

If you agree, I could try to produce a patch to that effect.

  Sure, that would be welcome. The public entry points are in
include/libxml/catalog.h then patching them to do something like

static xmlChar *
xmlCatalogNormalizePublic(const xmlChar *pubid) {
   return(NULL if not needed or copy otherwise)
}

foo(const xmlChar *pubid) {
   xmlChar *normid;

   normid = xmlCatalogNormalizePublic(pubid);
   if (normid != NULL) pubid = normid;

   ....

   if (normid != NULL) xmlFree(normid);
}

  would be greatly appreciated :-)

Daniel

-- 
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/



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