<?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>3790</bug_id>
          
          <creation_ts>2006-10-04 04:18:26 +0000</creation_ts>
          <short_desc>spurious space in copynamespace-3.txt ... copynamespace-6.txt</short_desc>
          <delta_ts>2006-11-23 05:44:40 +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>Linux</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="Per Bothner">per</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <cc>carmelo</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>12264</commentid>
    <comment_count>0</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-10-04 04:18:26 +0000</bug_when>
    <thetext>The expected output files copynamespace-3.txt, copynamespace-4.txt, copynamespace-5.txt, and copynamespace-6.txt (for tests copynamespace-3, copynamespace-4, copynamespace-5, and copynamespace-6) contain a spurious spacr before and/or after the actual expected output.  The compare mode is &quot;Text&quot; for these files, so they should not have any extra spaces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12276</commentid>
    <comment_count>1</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-10-04 14:20:43 +0000</bug_when>
    <thetext>Per:

Thanks for the comment.  I removed the spurious characters from the tests
results.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12911</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2006-11-10 16:03:24 +0000</bug_when>
    <thetext>Could you please explain why this space is spurious.  For example, in copynamespaces-4 (below) the in-scope-prefixes($new//child::*) should return a sequence of three strings (&quot;xml&quot;, &quot;foo&quot;, &quot;&quot;).  

Either:

1.  I&apos;m wrong and the result of in-scope-prefixes should only be (&quot;xml&quot;, &quot;foo&quot;).
2.  I&apos;m right but the space should be dropped for some reason (why?) - if so, the test doesn&apos;t discriminate between the results (&quot;xml&quot;, &quot;foo&quot;) and (&quot;xml&quot;, &quot;foo&quot;, &quot;&quot;).



declare namespace foo = &quot;http://example.org&quot;;
declare copy-namespaces preserve,inherit;

(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)

let $existingElement := &lt;existingElement xmlns=&quot;www.existingnamespace.com&quot;&gt;{&quot;Exi
sting Content&quot;}&lt;/existingElement&gt;
let $new := &lt;foo:newElement xmlns = &quot;www.mynamespace.com&quot;&gt;{$existingElement}&lt;/fo
o:newElement&gt;
for $var in (in-scope-prefixes($new//child::*))
order by $var ascending
return $var
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12912</commentid>
    <comment_count>3</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-11-10 17:22:25 +0000</bug_when>
    <thetext>I think you&apos;re right, but it&apos;s been over a month and I don&apos;t remember clearly. I do remember looking at various testcase, thinking some should start with a space and some should not.

If one wanted to test just in-scope-namespaces without at the same time testing serialization one could replace $var by (say) concat(&quot;[&quot;,$var,&quot;]&quot;).  Of course one does want to test serialization, but perhaps those should be separate tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12927</commentid>
    <comment_count>4</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-11-15 07:41:01 +0000</bug_when>
    <thetext>I took a look at these testcases, as well as a 3 other copynamespace-X
that are (I believe) incorrectly failing.

I believe the result for the following should include the empty
prefix, so they should start with a space:
copynamespace-3 - should return &quot; xml&quot;
copynamespace-4 - should be &quot; foo xml&quot;
copynamespace-5 - should be &quot; foo xml&quot;
copynamespace-6 - should be &quot; foo xml&quot;

In copynamespace-9 I believe &apos;newNamespace&apos; should be
inherited, so should be in the result.  I.e.:
copynamespace-9 - should be &quot;newNamespace xml&quot;

For copynamespace-16, I believe when $element2 is copied into
the &lt;element3&gt;constructor, the newly copied nodes *including
the copied element1 node* inherit the namespace3 binding.
So, according to my reading of the specification:
copynamespace-16 - should be &quot;namespace3 xml&quot;

I believe the same argument applies here:
copynamespace-20 - should be &quot;namespace3 xml&quot;

Hopefully, some experts can confirm or disconfirm my readings.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12930</commentid>
    <comment_count>5</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-11-16 08:09:28 +0000</bug_when>
    <thetext>Constr-cont-nsmode-2 seems similar to opynamespace-9,c opynamespace-16, and copynamespace-20: It should have the inherited namespace:
Constr-cont-nsmode-2 - should return &quot;&lt;z xmlns:inherit=&quot;inherit&quot;/&gt;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12940</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-11-17 15:50:15 +0000</bug_when>
    <thetext>I concur with comment #4 that

copynamespace-3 - should return &quot; xml&quot;
copynamespace-4 - should be &quot; foo xml&quot;
copynamespace-5 - should be &quot; foo xml&quot;
copynamespace-6 - should be &quot; foo xml&quot;

I agree with Per about the results of copynamespace-9, 16, and 20: in each case the result advocated by Per is the same as the result in CVS, so I&apos;m not sure where the issue lies.



</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12944</commentid>
    <comment_count>7</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-11-17 21:42:21 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; I agree with Per about the results of copynamespace-9, 16, and 20: in each case
&gt; the result advocated by Per is the same as the result in CVS, so I&apos;m not sure
&gt; where the issue lies.

I think I somehow confused the expected and actual outputs.
My apologies.  Anyway, they&apos;re now the same. :-)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12977</commentid>
    <comment_count>8</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-11-21 13:06:29 +0000</bug_when>
    <thetext>I&apos;ve made the changes requested in comment #4.

Please close this bug report if you agree with this resolution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13011</commentid>
    <comment_count>9</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-11-23 05:44:40 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; I&apos;ve made the changes requested in comment #4.
&gt; Please close this bug report if you agree with this resolution.

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>