<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2613</bug_id>
          
          <creation_ts>2005-12-21 16:43:43 +0000</creation_ts>
          <short_desc>namespace-alias and #default</short_desc>
          <delta_ts>2006-03-10 21:18:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 2.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7533</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-12-21 16:43:45 +0000</bug_when>
    <thetext>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=&quot;#default&quot; if there is no
default namespace (that is, if the declaration xmlns=&quot;&quot; is in force explicitly
or implicitly). The same applies to result-prefix.

I&apos;ve recently got around to implementing this decision and it breaks a few XSLT
1.0 test cases. I&apos;m not suggesting that the decision should be changed, but we
should document it as a backwards-incompatibility. 

The XSLT 1.0 spec isn&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8012</commentid>
    <comment_count>1</comment_count>
      <attachid>400</attachid>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-27 19:48:47 +0000</bug_when>
    <thetext>Created attachment 400
A stylesheet that demonstrates the incompatibility</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8013</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-27 19:49:09 +0000</bug_when>
    <thetext>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&apos;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:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;out xmlns=&quot;ns://www.error.com/&quot; xmlns:err=&quot;ns://www.error.com/&quot;&gt;
   &lt;banana xmlns=&quot;&quot;&gt;
      &lt;yyy xmlns=&quot;ns://www.error.com/&quot;/&gt;
   &lt;/banana&gt;
&lt;/out&gt;

(Other processors are likely to use &quot;err&quot; 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.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8112</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-02-02 19:34:20 +0000</bug_when>
    <thetext>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 &quot;null namespace&quot; if no
explicit namespace is bound.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8670</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-03-10 21:18:22 +0000</bug_when>
    <thetext>This change has been applied to the spec and the issue is now closed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>400</attachid>
            <date>2006-01-27 19:48:44 +0000</date>
            <delta_ts>2006-01-27 19:48:44 +0000</delta_ts>
            <desc>A stylesheet that demonstrates the incompatibility</desc>
            <filename>nspc99055err.xsl</filename>
            <type>application/xml+xslt</type>
            <size>556</size>
            <attacher name="Michael Kay">mike</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8eHNsOnN0eWxlc2hlZXQNCiAgIHhtbG5zOnhzbD0iaHR0
cDovL3d3dy53My5vcmcvMTk5OS9YU0wvVHJhbnNmb3JtIiB2ZXJzaW9uPSIxLjAiDQogICANCiAg
IHhtbG5zOmVycj0ibnM6Ly93d3cuZXJyb3IuY29tLyI+DQoNCjw/c3BlYyB4c2x0I25hbWVzcGFj
ZS1hbGlhc2luZz8+DQo8P2Vycm9yIFhUU0UwODE1Pz4NCiAgPCEtLSBVbmRlY2xhcmVkIGRlZmF1
bHQgc3R5bGVzaGVldCBwcmVmaXggLS0+DQogIA0KPHhzbDpuYW1lc3BhY2UtYWxpYXMgc3R5bGVz
aGVldC1wcmVmaXg9IiNkZWZhdWx0IiByZXN1bHQtcHJlZml4PSJlcnIiLz4NCjx4c2w6b3V0cHV0
IGluZGVudD0ieWVzIi8+ICANCg0KDQo8eHNsOnRlbXBsYXRlIG1hdGNoID0gIi8iPg0KICA8eHNs
OnBhcmFtIG5hbWU9ImMiIHNlbGVjdD0iJ2JhbmFuYSciLz4NCiAgPG91dD4NCiAgICA8eHNsOmVs
ZW1lbnQgbmFtZT0ieyRjfSI+DQogICAgICA8eXl5Lz4NCiAgICA8L3hzbDplbGVtZW50Pg0KICA8
L291dD4NCjwveHNsOnRlbXBsYXRlPg0KDQo8L3hzbDpzdHlsZXNoZWV0Pg==
</data>

          </attachment>
      

    </bug>

</bugzilla>