<?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>4864</bug_id>
          
          <creation_ts>2007-07-18 15:13:55 +0000</creation_ts>
          <short_desc>1.0.3dev: K2-CopyNamespacesProlog-1</short_desc>
          <delta_ts>2010-03-16 15:59:24 +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>
          
          
          <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>15857</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-18 15:13:55 +0000</bug_when>
    <thetext>In the query:

(:*******************************************************:)
(: Test: K2-CopyNamespacesProlog-1                       :)
(: Written by: Frans Englich                             :)
(: Date: 2007-07-17T17:04:39+01:00                       :)
(: Purpose: Use no-preserve, inherit with the default namespace. :)
(:*******************************************************:)
declare copy-namespaces no-preserve, inherit;
&lt;doc&gt;
    &lt;a&gt;{&lt;b xmlns:p=&quot;q&quot;/&gt;}&lt;/a&gt;
    &lt;a&gt;&lt;b xmlns:p=&quot;q&quot;/&gt;&lt;/a&gt;
&lt;/doc&gt;

then expected result is:

&lt;doc&gt;
  &lt;a&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;
  &lt;a&gt;&lt;b xmlns:p=\&quot;q\&quot;&gt;&lt;/b&gt;&lt;/a&gt;
&lt;/doc&gt;

which we don&apos;t quite understand.

On the one hand, reading:

http://www.w3.org/TR/xquery/#id-content

seems to suggest that copying (and therefore the influence of the copy namespaces mode) only comes into play when dealing with enclosed expressions.

However, reading the Formal Semantics document

http://www.w3.org/TR/xquery-semantics/#id_element_constructor

I can&apos;t see anything which wuold result in the normalized forms of these two expressions being different.  Specifically, there doesn&apos;t seem to be any special rule for enclosed expressions.  Or have I missed something?

Is the expected result of this test correct?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15862</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-07-18 17:12:13 +0000</bug_when>
    <thetext>It&apos;s fairly bizarre and probably unintended that these two expressions produce different results, but I think the XQuery language book makes it clear that they do. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15869</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-19 06:46:21 +0000</bug_when>
    <thetext>Thanks.  Could you elaborate?

Would you agree that this doesn&apos;t appear to be reflected in the Formal Semantics?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15871</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-07-19 08:30:18 +0000</bug_when>
    <thetext>&gt;Would you agree that this doesn&apos;t appear to be reflected in the Formal
Semantics?

I wouldn&apos;t dare to venture an opinion. I&apos;m not one of the three people in the world who understands the formal semantics...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15872</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-19 08:33:31 +0000</bug_when>
    <thetext>:)

I&apos;ll raise this as an issue under FS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15874</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-19 08:45:19 +0000</bug_when>
    <thetext>Hopefully there will be some follow-up in Bug 4869.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15963</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-07-30 12:58:57 +0000</bug_when>
    <thetext>Interestingly, the XQueryX version of this query represents the content of the two &lt;a&gt; tags identically.  This suggests that the distinction between enclosed expressions and &apos;normal&apos; element content has been missed there too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16033</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2007-08-03 09:17:45 +0000</bug_when>
    <thetext>From Bug 4869 Comment #3, it seems that the XQueryX version of K2-CopyNamespacesProlog-1 is wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16464</commentid>
    <comment_count>8</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2007-09-11 14:31:16 +0000</bug_when>
    <thetext>I&apos;m closing this report since it has been concluded that the test case is aligned with the XQuery spec, while FS is not.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>