This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Some time ago, I think in response to a comment from Oliver Becker during the first last call [1], we decided that it should be an error for xsl:namespace-alias to specify stylesheet-prefix="#default" if there is no default namespace (that is, if the declaration xmlns="" is in force explicitly or implicitly). The same applies to result-prefix. I've recently got around to implementing this decision and it breaks a few XSLT 1.0 test cases. I'm not suggesting that the decision should be changed, but we should document it as a backwards-incompatibility. The XSLT 1.0 spec isn't very clear about what should happen, but some processors at least adopted the interpretation that xsl:namespace-alias should be able to move elements from the null namespace into an actual namespace or vice versa, and that capability no longer exists. [1] http://lists.w3.org/Archives/Public/public-qt-comments/2003Sep/0009.html
Created attachment 400 [details] A stylesheet that demonstrates the incompatibility
I was actioned to provide an example of a stylesheet that demonstrates this incompatibility. An example is attached (it can be used with any source document). Note that it's unclear in the XSLT 1.0 spec whether this should work or not, but it does work in Saxon and may well work in other processors. Under Saxon 6.5.5 it produces the result: <?xml version="1.0" encoding="utf-8"?> <out xmlns="ns://www.error.com/" xmlns:err="ns://www.error.com/"> <banana xmlns=""> <yyy xmlns="ns://www.error.com/"/> </banana> </out> (Other processors are likely to use "err" as the namespace prefix) Under Saxon 8.6.1 it produces: Error at xsl:namespace-alias on line 11 of file:/C:/MyJava/tests/testsuite/nspc/nspc99055err.xsl: XTSE0815: #default cannot be used: there is no default namespace Failed to compile stylesheet. 1 error detected.
Looking at the behaviour of existing XSLT 1.0 processors, some of them allow this stylesheet and others reject it. Because it would cause significant impact on anyone who is using the facility, we decided to remove this error condition and instead define that the value #default refers to the "null namespace" if no explicit namespace is bound.
This change has been applied to the spec and the issue is now closed.