Your message dated Thu, 27 Oct 2005 14:02:42 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#335846: fixed in libxml-mini-perl 1.2.8-3
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; 26 Oct 2005 08:32:25 +0000
>From [EMAIL PROTECTED] Wed Oct 26 01:32:25 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mxintern.kundenserver.de (mxintern.schlund.de) [212.227.126.201]
by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
id 1EUght-00077m-00; Wed, 26 Oct 2005 01:32:25 -0700
Received: from [172.17.39.8] (helo=beate.use.schlund.de)
by mxintern.kundenserver.de with esmtp (TLSv1:DES-CBC3-SHA:168)
(Exim 4.34)
id 1EUghr-0007kE-P8
for [EMAIL PROTECTED]; Wed, 26 Oct 2005 10:32:24 +0200
Received: from mlaue by beate.use.schlund.de with local (Exim 4.50)
id 1EUghq-0001Ay-ML
for [EMAIL PROTECTED]; Wed, 26 Oct 2005 10:32:22 +0200
Date: Wed, 26 Oct 2005 10:32:22 +0200
From: Marc Laue <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Attributes in header output are always sorted alphabetically, which
violates XML 1.1 Recommendation
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="vGgW1X5XWziG23Ko"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
X-Virus-Scanned: Symantec AntiVirus Scan Engine
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
--vGgW1X5XWziG23Ko
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Package: libxml-mini-perl
Version: 1.2.8-2
According to the XML 1.1 W3C Recommendation
(http://www.w3.org/TR/2004/REC-xml11-20040204/) section 2.8 the XML header is
declared as
XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S?'?>'
which means that the version attribute is supposed to be left from the
encoding. Unfortunately the header class of XML::Mini always sorts its
attributes alphabetically before printing, which makes it impossible to create
a header that is accepted by a different program using libxml.
I have included an example program, as well as a patch fixing the problem
mentioned above.
Regards
Marc Laue
--vGgW1X5XWziG23Ko
Content-Type: text/x-perl; charset=us-ascii
Content-Disposition: attachment; filename="test2.pl"
#! /usr/bin/perl
use strict;
use XML::Mini::Document;
my $doc=XML::Mini::Document->new();
my $root=$doc->getRoot();
my $header=$root->prependChild(XML::Mini::Element::Header->new('xml'));
$header->attribute('version','1.0');
$header->attribute('encoding','UTF-8');
print $doc->toString(),"\n";
--vGgW1X5XWziG23Ko
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="fix2.patch"
diff -ur libxml-mini-perl-1.2.8.orig/lib/XML/Mini/Element/Header.pm
libxml-mini-perl-1.2.8/lib/XML/Mini/Element/Header.pm
--- libxml-mini-perl-1.2.8.orig/lib/XML/Mini/Element/Header.pm 2003-01-26
08:44:01.000000000 +0000
+++ libxml-mini-perl-1.2.8/lib/XML/Mini/Element/Header.pm 2005-10-26
08:18:35.000000000 +0000
@@ -40,9 +40,32 @@
my $retString = "$spaces<?". $self->name() . ' ';
my $attribString;
+
+ # ensure the order of attributes inside the header conforms to W3C
+ # Recommendation for XML 1.1
+ my $atValue;
+ $atValue = $self->{'_attributes'}->{'version'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|version="$atValue" |;
+ }
+ $atValue = $self->{'_attributes'}->{'encoding'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|encoding="$atValue" |;
+ }
+ $atValue = $self->{'_attributes'}->{'standalone'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|standalone="$atValue" |;
+ }
+
foreach my $atName (sort keys %{$self->{'_attributes'}})
{
- $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+ if (($atName ne 'version') && ($atName ne 'encoding') && ($atName ne
'standalone'))
+ {
+ $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+ }
}
if (defined $attribString && $attribString =~ m|\S|)
@@ -64,10 +87,34 @@
my $retString = '<? ' . $self->name();
my $attribString;
+
+ # ensure the order of attributes inside the header conforms to W3C
+ # Recommendation for XML 1.1
+ my $atValue;
+ $atValue = $self->{'_attributes'}->{'version'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|version="$atValue" |;
+ }
+ $atValue = $self->{'_attributes'}->{'encoding'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|encoding="$atValue" |;
+ }
+ $atValue = $self->{'_attributes'}->{'standalone'};
+ if (defined $atValue)
+ {
+ $attribString .= qq|standalone="$atValue" |;
+ }
+
foreach my $atName (sort keys %{$self->{'_attributes'}})
{
- $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
- }
+ if (($atName ne 'version') && ($atName ne 'encoding') && ($atName ne
'standalone'))
+ {
+ $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+ }
+ }
+
if (defined $attribString && $attribString =~ m|\S|)
{
$retString .= $attribString;
--vGgW1X5XWziG23Ko--
---------------------------------------
Received: (at 335846-close) by bugs.debian.org; 27 Oct 2005 21:08:35 +0000
>From [EMAIL PROTECTED] Thu Oct 27 14:08:35 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
id 1EVEtW-0004jp-00; Thu, 27 Oct 2005 14:02:42 -0700
From: Raphael Hertzog <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#335846: fixed in libxml-mini-perl 1.2.8-3
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 27 Oct 2005 14:02:42 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
Source: libxml-mini-perl
Source-Version: 1.2.8-3
We believe that the bug you reported is fixed in the latest version of
libxml-mini-perl, which is due to be installed in the Debian FTP archive:
libxml-mini-perl_1.2.8-3.diff.gz
to pool/main/libx/libxml-mini-perl/libxml-mini-perl_1.2.8-3.diff.gz
libxml-mini-perl_1.2.8-3.dsc
to pool/main/libx/libxml-mini-perl/libxml-mini-perl_1.2.8-3.dsc
libxml-mini-perl_1.2.8-3_all.deb
to pool/main/libx/libxml-mini-perl/libxml-mini-perl_1.2.8-3_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Raphael Hertzog <[EMAIL PROTECTED]> (supplier of updated libxml-mini-perl
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 27 Oct 2005 21:40:58 +0200
Source: libxml-mini-perl
Binary: libxml-mini-perl
Architecture: source all
Version: 1.2.8-3
Distribution: unstable
Urgency: low
Maintainer: Raphael Hertzog <[EMAIL PROTECTED]>
Changed-By: Raphael Hertzog <[EMAIL PROTECTED]>
Description:
libxml-mini-perl - Perl implementation of the MiniXML XML generator and parser
Closes: 335841 335846
Changes:
libxml-mini-perl (1.2.8-3) unstable; urgency=low
.
* Include patches from Marc Laue <[EMAIL PROTECTED]> for better
conformance with the XML norm.
Closes: #335841, #335846
Files:
0dc4ca604430dbfec9dc3efc24d67d52 620 perl optional libxml-mini-perl_1.2.8-3.dsc
6c8bb466d71efbbc3c8950c33933a6f9 3468 perl optional
libxml-mini-perl_1.2.8-3.diff.gz
064928b0658565f79a848cd902718043 65224 perl optional
libxml-mini-perl_1.2.8-3_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDYS5NvPbGD26BadIRAlS9AJ0Z1dnvixPnLdhvSCRLupj1j4yFkQCdEoBz
+NlzQcBOuUjx16scaHm1fio=
=1Zlg
-----END PGP SIGNATURE-----
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]