<?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>5723</bug_id>
          
          <creation_ts>2008-05-29 11:51:06 +0000</creation_ts>
          <short_desc>CVS: K2-ComputeConAttr-54 Incorrect expected result</short_desc>
          <delta_ts>2008-06-25 11:51:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Tim Mills">tim</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>frans.englich</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>20304</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-05-29 11:51:06 +0000</bug_when>
    <thetext>I believe that K2-ComputeConAttr-54 might be wrong.

The only place that I can find a reference to the introduction of
a new namespace prefix is in XQuery 3.7.4 In-scope Namespaces of a Constructed Element.

The introduction of an implementation-dependent prefix will only occur when
the attribute is copied as a child of an element during element construction.

i.e. I expect the result of

&lt;element&gt;
{
  let $name := QName(&quot;http://example.com/&quot;, &quot;attr&quot;),
      $attr := attribute {$name} {()} return
    ( $attr, text { prefix-from-QName(node-name($attr)) } )
}
&lt;/element&gt;

to be of the form

&lt;element xmlns:generated-prefix=&quot;http://example.com/&quot; 
         generated-prefix:attr=&quot;&quot;/ &gt;

and not

&lt;element xmlns:generated-prefix=&quot;http://example.com/&quot; 
         generated-prefix:attr=&quot;&quot;&gt;generated-prefix&lt;/element&gt;

Here&apos;s the XQTS query for reference.

(:*******************************************************:)
(: Test: K2-ComputeConAttr-54                            :)
(: Written by: Frans Englich                             :)
(: Date: 2007-11-22T11:31:21+01:00                       :)
(: Purpose: Ensure that a valid prefix has been constructed for a QName which th
e implementation is supposed to create a prefix for. :)
(:*******************************************************:)
string-length(xs:NCName(prefix-from-QName(node-name(attribute {QName(&quot;http://exa
mple.com/&quot;, &quot;attr&quot;)} {()})))) &gt; 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20795</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-24 14:30:05 +0000</bug_when>
    <thetext>This test case was in response to a queued errata change:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4443


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20804</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-24 15:04:20 +0000</bug_when>
    <thetext>I&apos;ve queried the resolution to Bug 4443 in light of Bug 4463.

I came across this error while trying to write a test case to hit (from Bug 4463)

&quot;(4) Section 3.7.3.2 (Computed Attribute Constructors)
Replace the paragraph following the first numbered list as follows:
A dynamic error [XQDY0044] is raised if the node-name of the constructed 
attribute node has any of the following properties:

(b) It has no namespace prefix and its local name is xmlns&quot;

How can this be hit?  With 4443 implemented, the following:

attribute { fn:QName(&apos;xmlns&apos;, &apos;http://www.example.com/&apos;) } { &apos;foo&apos; }

would create an attribute with an implementation-defined prefix, as if the user had written:

attribute { fn:QName(&apos;xmlns&apos;, &apos;http://www.example.com/&apos;) } { &apos;foo&apos; }

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20806</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-24 15:19:14 +0000</bug_when>
    <thetext>Though to me it seems these test cases are conforming to the specs, when taking into account the erratas. Are you ok with reopening this report if/when 4443 gets reverted/changed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20809</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-24 15:35:53 +0000</bug_when>
    <thetext>Is this error listed in the errata yet?

If so, yes, otherwise I&apos;d prefer to leave it open.

BTW, do you have any comments on what I&apos;ve suggested regarding 4443?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20843</commentid>
    <comment_count>5</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-25 11:37:55 +0000</bug_when>
    <thetext>What error? The error that a prefix is invented for an isolated attribute node as K2-ComputeConAttr-54 verifies? Yes, I believe the change to 3.7.3.2 as described in bug 4443 covers that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20845</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-25 11:51:16 +0000</bug_when>
    <thetext>Ah yes - it&apos;s XQ.E9.

OK.  I&apos;ll close this for the moment.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>