Debian Bug report logs - #568348
libsaxon-java: produces extra NS declaration if multiple prefixes for NS

version graph

Package: libsaxon-java; Maintainer for libsaxon-java is Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>; Source for libsaxon-java is src:libsaxon-java.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.net>

Date: Thu, 4 Feb 2010 03:18:01 UTC

Severity: important

Tags: moreinfo

Found in version libsaxon-java/1:6.5.5-6

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#568348; Package libsaxon-java. (Thu, 04 Feb 2010 03:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Thu, 04 Feb 2010 03:18:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libsaxon-java: produces extra NS declaration if multiple prefixes for NS
Date: Thu, 4 Feb 2010 03:10:13 +0000
[Message part 1 (text/plain, inline)]
Package: libsaxon-java
Version: 1:6.5.5-6
Severity: important
File: /usr/share/java/saxon.jar

If, in a stylesheet, the same namespace is declared both as the default
namespace and with a prefix, and the prefix is present in the
exclude-result-prefixes attribute, Saxon will emit a namespace
declaration for the prefixed form as well.

For example, in the attached testcase, the XHTML namespace is both the
default namespace (xmlns) and a prefixed namespace (xmlns:xhtml).  Since
the "xhtml" prefix is listed in exclude-result-prefixes, it should not
be emitted by Saxon, but it is anyway.

This causes problems for stylesheets that process XHTML input and
produces XHTML output.  In XSLT 1.0, unprefixed element names in
xsl:template match statements are not interpreted as being in the
default namespace, but rather in no namespace.  Therefore, to be able to
match elements in the XHTML namespace, some prefix must be defined for
the purpose of matching these elements.  However, on output, the only
namespace declaration that can be present is the default one, since DTDs
do not understand namespace declarations.

As a consequence, Saxon is not particularly well-suited to processing
XHTML, which is a significant (and possibly the most common) use case.
There is a workaround: if inline elements are not used, but instead
replaced with xsl:element and xsl:attribute code, the spurious
declaration is not emitted.  This significantly bloats the stylesheet,
however, and makes it hard to read.

Transcript follows:

lakeview ok % xsltproc foo.xsl dummy.dbx                                     
<?xml version="1.0"?>
<db:book xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml"><a href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a><a href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a></db:book>

lakeview ok % java -jar /usr/share/java/xalan2.jar -in dummy.dbx -xsl foo.xsl
<?xml version="1.0" encoding="UTF-8"?><db:book xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml"><a href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a><a href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a></db:book>

lakeview ok % java -jar /usr/share/java/saxon.jar dummy.dbx foo.xsl          
<?xml version="1.0" encoding="utf-8"?><db:book xmlns:db="http://docbook.org/ns/docbook" xmlns="http://www.w3.org/1999/xhtml"><a xmlns:xhtml="http://www.w3.org/1999/xhtml" href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a><a xmlns:xhtml="http://www.w3.org/1999/xhtml" href="http://validator.w3.org/check/referer">XHTML+RDFa 1.0</a></db:book>%

Notice that the Saxon output contains an xmlns:xhtml declaration that is
undesired and also useless.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libsaxon-java depends on:
ii  default-jre [java2-runtime]   1.6-34     Standard Java or Java compatible R
ii  gcj-4.4-jre [java2-runtime]   4.4.3-1    Java runtime environment using GIJ
ii  gcj-jre [java2-runtime]       4:4.4.2-3  Java runtime environment using GIJ
ii  openjdk-6-jre [java2-runtime] 6b17-1.7-1 OpenJDK Java runtime, using Hotspo

libsaxon-java recommends no packages.

Versions of packages libsaxon-java suggests:
ii  libjdom1-java               1.1.1+dfsg-1 lightweight and fast library using
pn  libsaxon-java-doc           <none>       (no description available)

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#568348; Package libsaxon-java. (Thu, 04 Feb 2010 03:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Thu, 04 Feb 2010 03:27:02 GMT) Full text and rfc822 format available.

Message #10 received at 568348@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: 568348@bugs.debian.org
Subject: Attachments
Date: Thu, 4 Feb 2010 03:22:41 +0000
[Message part 1 (text/plain, inline)]
The files that I mentioned are attached.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[dummy.dbx (text/plain, attachment)]
[foo.xsl (application/xml, attachment)]
[signature.asc (application/pgp-signature, inline)]

Changed Bug submitter to '"brian m. carlson" <sandals@crustytoothpaste.net>' from '"brian m. carlson" <sandals@crustytoothpaste.ath.cx>' Request was from "brian m. carlson" <sandals@crustytoothpaste.net> to control@bugs.debian.org. (Thu, 03 Feb 2011 20:52:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#568348; Package libsaxon-java. (Tue, 14 May 2013 07:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Malaterre <malat@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Tue, 14 May 2013 07:45:05 GMT) Full text and rfc822 format available.

Message #17 received at 568348@bugs.debian.org (full text, mbox):

From: Mathieu Malaterre <malat@debian.org>
To: 568348@bugs.debian.org, Control bugs server <control@bugs.debian.org>
Cc: 568348-submitter@bugs.debian.org
Subject: libsaxon-java: produces extra NS declaration if multiple prefixes for NS
Date: Tue, 14 May 2013 09:40:07 +0200
tags 568348 moreinfo
thanks

Shouldn't it be reported upstream instead ? saxon 6.5.5 hasnot been
work on for a long time.



Added tag(s) moreinfo. Request was from Mathieu Malaterre <malat@debian.org> to control@bugs.debian.org. (Tue, 14 May 2013 07:45:07 GMT) Full text and rfc822 format available.

Message sent on to "brian m. carlson" <sandals@crustytoothpaste.net>:
Bug#568348. (Tue, 14 May 2013 07:45:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#568348; Package libsaxon-java. (Sat, 18 May 2013 01:51:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Sat, 18 May 2013 01:51:09 GMT) Full text and rfc822 format available.

Message #27 received at 568348@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Mathieu Malaterre <malat@debian.org>, 568348-quiet@bugs.debian.org
Cc: 568348@bugs.debian.org, Control bugs server <control@bugs.debian.org>, 568348-submitter@bugs.debian.org
Subject: Re: Bug#568348: libsaxon-java: produces extra NS declaration if multiple prefixes for NS
Date: Sat, 18 May 2013 01:47:27 +0000
[Message part 1 (text/plain, inline)]
On Tue, May 14, 2013 at 09:40:07AM +0200, Mathieu Malaterre wrote:
> tags 568348 moreinfo
> thanks
> 
> Shouldn't it be reported upstream instead ? saxon 6.5.5 hasnot been
> work on for a long time.

You're welcome to report it upstream, if there is still any upstream
support for it.  I generally don't forward bugs upstream unless I am
submitting a patch, because I just do not need more BTS accounts.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information stored :
Bug#568348; Package libsaxon-java. (Sat, 18 May 2013 01:51:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Extra info received and filed, but not forwarded. (Sat, 18 May 2013 01:51:16 GMT) Full text and rfc822 format available.

Message sent on to "brian m. carlson" <sandals@crustytoothpaste.net>:
Bug#568348. (Sat, 18 May 2013 01:51:19 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 01:09:45 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.