[xml] Namespaces and Uniqueness of Attributes
- From: Karl Eichwalder <ke suse de>
- To: xml gnome org
- Subject: [xml] Namespaces and Uniqueness of Attributes
- Date: Fri, 27 Aug 2004 08:30:36 +0200
Up to libxml2 2.6.11 xmllint used to parse this code
<element name="foo" xmlns:rng="http://example.org/ns/1"
xmlns="http://example.org/ns/1">
<empty/>
</element>
as
<?xml version="1.0"?>
<element xmlns:rng="http://example.org/ns/1" xmlns="http://example.org/ns/1"
name="foo">
<empty/>
</element>
Now it adds the prefix of the default(?) namespace:
<?xml version="1.0"?>
<element xmlns:rng="http://example.org/ns/1" xmlns="http://example.org/ns/1"
name="foo">
<rng:empty/>
</element>
If the attributes are unique, it does not add the prefix:
<?xml version="1.0"?>
<element xmlns:rng="http://example.org/ns/1" xmlns="http://example.org/ns/1X"
name="foo">
<empty/>
</element>
<?xml version="1.0"?>
<element xmlns:rng="http://example.org/ns/1" xmlns="http://example.org/ns/1X"
name="foo">
<empty/>
</element>
This change affects the trang testsuite.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]