<?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>12645</bug_id>
          
          <creation_ts>2011-05-11 08:44:48 +0000</creation_ts>
          <short_desc>Incorrect example for computed namespace constructors</short_desc>
          <delta_ts>2011-06-10 22:22:12 +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>XQuery 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
          
          <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>48471</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-05-11 08:44:48 +0000</bug_when>
    <thetext>In section 3.8.3 this example is incorrect:

&lt;form&gt;
 {
    namespace a {&quot;http://a.example.com&quot; },
    attribute { xs:QName(&quot;a:id&quot;) } { &quot;a-12-XE-45&quot; },
    element { xs:QName(&quot;a:field&quot;)} { &quot;Sample data&quot; }
 }
&lt;/form&gt;

The expression xs:QName(&quot;a:id&quot;) requires prefix &quot;a&quot; to be present in the static context, which it isn&apos;t; it&apos;s only present in the in-scope namespaces of the new form element.

It&apos;s also a poor choice of example because no computed namespace constructor is needed here; the namespace will be created automatically by the fixup process. A better example would be

&lt;age xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt; {
  namespace xs {&quot;http://www.w3.org/2001/XMLSchema&quot;},
  attribute xsi:type {&quot;xs:integer&quot;},
  23
}&lt;/age&gt;

This illustrates the distinction between the xsi namespace which is created automatically because it&apos;s used in an attribute name, and the xs namespace which needs to be created by hand because it&apos;s used only in attribute content. (Though of course, it could be created statically if it&apos;s known statically).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49450</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2011-06-10 22:21:44 +0000</bug_when>
    <thetext>The XML Query WG agreed during its meeting on 2011-06-07 (documented in members-only email archived at http://lists.w3.org/Archives/Member/w3c-xsl-query/2011Jun/0010.html) with the problem and with the proposed solution.  Based on this decision, we are marking the bug as RESOLVED/FIXED.  Because you were present when the decision was made and are in agreement with the resolution, I am also marking the bug CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>