Re: [xml] RelaxNG schema and entities file: "namespace warning : Namespace default prefix was not found"

2009-11-20 Thread Hannes Magnusson
On Tue, Nov 17, 2009 at 09:43, Daniel Veillard  wrote:
> On Wed, Nov 11, 2009 at 04:54:23PM +0100, Daniel Leidert wrote:
>> Hi,
>>
>> Consider this example:
>>
>> > '>
>> ]>
>> http://foo.bar/ns/foo";>
>> ...
>> &comment;
>> ...
>> 
>>
>> When I run `xmllint --noout --noent --relaxng foo.rng foo.xml' I
>> receive:
>>
>> | namespace warning : Namespace default prefix was not found
>> | ...
>> | element comment: Relax-NG validity error : Did not expect element comment 
>> there
>>
>> But `jing foo.rng foo.xml' succeeds and does not complain. I have to add
>> the xmlns attribute to  for xmllint to succeed. Is this correct
>> or an issue in xmllint? I wouldn't have expected, that I have to add the
>> namespace to this entity. I thought it gets directly replaced.
>
>  libxml2 being designed as an editing toolkit, and before XML
> namespaces does not handle well this kind of namespace and entities
> mixups. Best is to add the namespace declaration in ten entity, yes.

We had the same issue for our (php.net and pear.php.net)
documentations (written in Docbook5).
We use "shitloads" of entities for various things and "suddenly" got
thousends of "namespace default prefix was not found" errors as of
libxml2.7.4 (or was it .5 maybe?).

Although I do understand the logic be behind it (see bug#502960), it
caused us great deal of problems and not something I expected from a
bugfix release :|
To late to do anything about it now, long after the release :(

-Hannes
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] RelaxNG schema and entities file: "namespace warning : Namespace default prefix was not found"

2009-11-17 Thread Daniel Veillard
On Wed, Nov 11, 2009 at 04:54:23PM +0100, Daniel Leidert wrote:
> Hi,
> 
> Consider this example:
> 
>  '>
> ]>
> http://foo.bar/ns/foo";>
> ...
> &comment;
> ...
> 
> 
> When I run `xmllint --noout --noent --relaxng foo.rng foo.xml' I
> receive:
> 
> | namespace warning : Namespace default prefix was not found
> | ...
> | element comment: Relax-NG validity error : Did not expect element comment 
> there
> 
> But `jing foo.rng foo.xml' succeeds and does not complain. I have to add
> the xmlns attribute to  for xmllint to succeed. Is this correct
> or an issue in xmllint? I wouldn't have expected, that I have to add the
> namespace to this entity. I thought it gets directly replaced.

  libxml2 being designed as an editing toolkit, and before XML
namespaces does not handle well this kind of namespace and entities
mixups. Best is to add the namespace declaration in ten entity, yes.

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml