You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Michael Ludwig <ml...@as-guides.com> on 2009/08/21 18:54:14 UTC

Duplicate definitions - Xalan-J bugs

The other day, I tested a couple of processors with regard to duplicate
definitions. I published the result on XSL-List.

[xsl] Duplicate definitions in XSLT 1.0 - Michael Ludwig
http://markmail.org/thread/dpmra2jahwcczvs5

There are three bugs in Xalan-J concerning duplicate definitions of:

* xsl:variable
* xsl:param
* xsl:namespace-alias

Very simple test cases are contained in the posting.

If more information or a bugtracker entry is needed, please reply
on-list. Thanks.

-- 
Michael Ludwig

Re: Duplicate definitions - Xalan-J bugs

Posted by Michael Ludwig <mi...@gmx.de>.
David Bertoni schrieb am 25.08.2009 um 11:00:06 (-0700):
> Michael Ludwig wrote:
> >
> >[xsl] Duplicate definitions in XSLT 1.0 - Michael Ludwig
> >http://markmail.org/thread/dpmra2jahwcczvs5
> >
> >There are three bugs in Xalan-J concerning duplicate definitions of:
> >
> >* xsl:variable
> >* xsl:param
> These are long-standing. The last time I requested they be fixed, the
> message was that the behavior remained for backwards-compatibility. I
> fixed this bug in Xalan-C a while back.

Great! Maybe some benevolent spirits will do the same for Xalan-J.
Backwards-compatibility is a dubious argument to defend a clear bug.
At the very least, a warning should be logged - these Xalan-J bugs may
hide bugs in user code, which can cost a lot of time. Especially when
relying on Xalan's compliance.

> >* xsl:namespace-alias
> This is interesting, as Xalan-C does not suffer from this bug, yet my 
> recollection is the implementations are very similar between the two 
> processors.

For convenience, to verify this bug, use the following to transform an
input doc of your liking:

<xsl:stylesheet version="1.0"
  xmlns:aaa="aaa"
  xmlns:eins="de.milu.eins"
  xmlns:zwei="de.milu.zwei"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:namespace-alias stylesheet-prefix="aaa" result-prefix="eins"/>
  <xsl:namespace-alias stylesheet-prefix="aaa" result-prefix="zwei"/>
  <xsl:template match="/"><aaa:Urmel/></xsl:template>
</xsl:stylesheet>

The result will be in the eins namespace when it should be in the zwei
namespace.

Michael

Re: Duplicate definitions - Xalan-J bugs

Posted by David Bertoni <db...@apache.org>.
Michael Ludwig wrote:
> The other day, I tested a couple of processors with regard to duplicate
> definitions. I published the result on XSL-List.
> 
> [xsl] Duplicate definitions in XSLT 1.0 - Michael Ludwig
> http://markmail.org/thread/dpmra2jahwcczvs5
> 
> There are three bugs in Xalan-J concerning duplicate definitions of:
> 
> * xsl:variable
> * xsl:param
These are long-standing. The last time I requested they be fixed, the 
message was that the behavior remained for backwards-compatibility. I 
fixed this bug in Xalan-C a while back.

> * xsl:namespace-alias
This is interesting, as Xalan-C does not suffer from this bug, yet my 
recollection is the implementations are very similar between the two 
processors.

Dave