<?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>1817</bug_id>
          
          <creation_ts>2005-07-26 13:54:49 +0000</creation_ts>
          <short_desc>[XSLT 2.0] Incorrect example for xsl:namespace</short_desc>
          <delta_ts>2005-07-28 22:37:52 +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>Last Call drafts</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>5209</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-07-26 13:54:49 +0000</bug_when>
    <thetext>In section 11.7, xsl:namespace, we find the example:

&lt;quote&gt;
Example: Conflicting Namespace Prefixes

Given the instruction:

&lt;p:item xmlns:p=&quot;p.uri&quot;&gt;&lt;xsl:namespace name=&quot;p&quot;&gt;q.uri&lt;/xsl:namespace&gt;&lt;/p:item&gt;

a possible serialization of the result tree is:

&lt;ns0:item xmlns:ns0=&quot;p.uri&quot; xmlns:p=&quot;q.uri&quot;/&gt;

The processor must invent a namespace prefix for the URI p.uri; it cannot use
the prefix p because that prefix has been explicitly associated with a different
URI.
&lt;/quote&gt;

In fact, the processor is not allowed to invent a prefix for p.uri: the rules
for literal result elements say that namespace nodes must be copied from the
stylesheet. So there is a conflict here, which should result in error XTDE0430.
Namespace prefixes can be invented only in the case of namespace nodes generated
by namespace fixup. So a better example would be:

    &lt;xsl:element name=&quot;p:item&quot; xmlns:p=&quot;p.uri&quot;&gt;
       &lt;xsl:namespace name=&quot;p&quot;&gt;q.uri&lt;/xsl:namespace&gt;
    &lt;/xsl:element&gt;

Here the processor can, and must, choose a prefix for p.uri that does not
conflict with the binding of p to q.uri.

Michael Kay
(this originated in a Saxon bug report from Colin Adams, who pointed out that
Saxon was giving different results for this example than the result stated in
the spec.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5282</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-07-28 22:37:32 +0000</bug_when>
    <thetext>The proposed change has been applied. I have also changed the example to use
legal namespace URIs.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>