[xml/sgml-pkgs] Bug#273226: marked as done (libxslt - broken handling of default namespace)

Debian Bug Tracking System owner@bugs.debian.org
Tue, 28 Sep 2004 19:03:07 -0700


Your message dated Wed, 29 Sep 2004 10:45:25 +0900
with message-id <20040929014525.GD4826@namakemono>
and subject line [xml/sgml-pkgs] Bug#273226: libxslt - broken handling of default namespace
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 24 Sep 2004 17:38:05 +0000
>From waldi@debian.org Fri Sep 24 10:38:05 2004
Return-path: <waldi@debian.org>
Received: from wavehammer.waldi.eu.org [82.139.196.55] (postfix)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CAu1E-0006JB-00; Fri, 24 Sep 2004 10:38:05 -0700
Received: by wavehammer.waldi.eu.org (Postfix, from userid 1000)
	id C108B3C017; Fri, 24 Sep 2004 19:38:01 +0200 (CEST)
Date: Fri, 24 Sep 2004 19:38:01 +0200
From: Bastian Blank <waldi@debian.org>
To: submit@bugs.debian.org
Subject: libxslt - broken handling of default namespace
Message-ID: <20040924173801.GA32064@wavehammer.waldi.eu.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW"
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040818i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--ew6BAiZeqk4r7MaW
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: libxslt1.1
Version: 1.1.8-4
Severity: normal

libxslt sometimes missuses the default namespace. The testcase is
attached.

| <xsl:stylesheet version=3D'1.0'
|   xmlns:xsl=3D'http://www.w3.org/1999/XSL/Transform'
|   xmlns:test=3D"urn::test">
|   <xsl:template match=3D"test:*">
|     <xsl:copy>
|       <xsl:apply-templates select=3D"@test:*"/>
|     </xsl:copy>
|   </xsl:template>
|   <xsl:template match=3D"@test:test">
|     <xsl:copy-of select=3D"."/>
|   </xsl:template>
| </xsl:stylesheet>

testcase with explicit namespace:
| <test:item xmlns:test=3D"urn::test" test:test=3D"test"/>

result:
| <?xml version=3D"1.0"?>
| <test:item xmlns:test=3D"urn::test" test:test=3D"test"/>

xsltproc output:
[...]
| xsltProcessOneNode: applying template 'test:*' for item
| xsltCopy: node item
| xsltApplyTemplates: node: item
| xsltApplyTemplates: select @test:*
| xsltApplyTemplates: list of 1 nodes
| xsltProcessOneNode: applying template '@test:test' for attribute test
| xsltCopyOf: select .
| xsltCopyOf: result is a node set

testcase with default namespace:
| <item xmlns=3D"urn::test" test=3D"test"/>

result:
| <?xml version=3D"1.0"?>
| <item xmlns=3D"urn::test">test</item>

xsltproc output:
[...]
| xsltProcessOneNode: applying template 'test:*' for item
| xsltCopy: node item
| xsltApplyTemplates: node: item
| xsltApplyTemplates: select @test:*
| xsltApplyTemplates: list of 1 nodes
| xsltProcessOneNode: no template found for attribute test
| xsltDefaultProcessOneNode: copy text test

This bug is restricted to the default/empty namespace. It does not occur if=
 I
define any identifier for the namespace.

Bastian

--=20
In the strict scientific sense we all feed on death -- even vegetarians.
		-- Spock, "Wolf in the Fold", stardate 3615.4

--ew6BAiZeqk4r7MaW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iEYEARECAAYFAkFUW3kACgkQnw66O/MvCNEkIQCfXOUjDpkp0psOsd1P0ZZ5JfP8
TKgAn331LscUfGDkBN90iwa799ymh0m2
=ns9m
-----END PGP SIGNATURE-----

--ew6BAiZeqk4r7MaW--

---------------------------------------
Received: (at 273226-done) by bugs.debian.org; 29 Sep 2004 01:45:27 +0000
>From mh@glandium.org Tue Sep 28 18:45:27 2004
Return-path: <mh@glandium.org>
Received: from d79.haichifl5.vectant.ne.jp (localhost.localdomain) [163.139.143.79] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CCTX4-00062H-00; Tue, 28 Sep 2004 18:45:27 -0700
Received: from mh by localhost.localdomain with local (Exim 4.34)
	id 1CCTX3-0001Zm-Rl; Wed, 29 Sep 2004 10:45:26 +0900
Date: Wed, 29 Sep 2004 10:45:25 +0900
From: Mike Hommey <mh@glandium.org>
To: Bastian Blank <waldi@debian.org>, 273226-done@bugs.debian.org
Subject: Re: [xml/sgml-pkgs] Bug#273226: libxslt - broken handling of default namespace
Message-ID: <20040929014525.GD4826@namakemono>
References: <20040924173801.GA32064@wavehammer.waldi.eu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20040924173801.GA32064@wavehammer.waldi.eu.org>
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: 273226-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

On Fri, Sep 24, 2004 at 07:38:01PM +0200, Bastian Blank wrote:
> Package: libxslt1.1
> Version: 1.1.8-4
> Severity: normal
> 
> libxslt sometimes missuses the default namespace. The testcase is
> attached.
(...)
> This bug is restricted to the default/empty namespace. It does not occur if I
> define any identifier for the namespace.

If there is a bug, it is in the XML Namespaces specification.

cf. http://www.w3.org/TR/REC-xml-names/#defaulting
A default namespace is considered to apply to the element where it is
declared (if that element has no namespace prefix), and to all elements
with no prefix within the content of that element. If the URI reference
in a default namespace declaration is empty, then unprefixed elements in
the scope of the declaration are not considered to be in any namespace.
*Note that default namespaces do not apply directly to attributes.*

And a bit after, in http://www.w3.org/TR/REC-xml-names/#uniqAttrs
However, each of the following is legal, the second because *the default
namespace does not apply to attribute names*

libxml2 is just following this spec, thus closing the bug.

Mike