<?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>10797</bug_id>
          
          <creation_ts>2010-09-28 21:03:26 +0000</creation_ts>
          <short_desc>Expected result for K2-NodeLangFunc-2 is wrong</short_desc>
          <delta_ts>2010-10-07 11:03:16 +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>1.0.3</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Sorin Nasoi">spungi</reporter>
          <assigned_to name="Benjamin Nguyen">benjie.nguyen</assigned_to>
          <cc>mike</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>39804</commentid>
    <comment_count>0</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2010-09-28 21:03:26 +0000</bug_when>
    <thetext>The expected result for test  

http://dev.w3.org/2006/xquery-test-suite/TestSuiteStagingArea/Queries/XQuery/Functions/NodeFunc/NodeLangFunc/K2-NodeLangFunc-2.xq

is &apos;true&apos;

http://dev.w3.org/cvsweb/~checkout~/2006/xquery-test-suite/TestSuiteStagingArea/ExpectedTestResults/Functions/NodeFunc/NodeLangFunc/K2-NodeLangFunc-2.txt?rev=1.1.1.1&amp;content-type=text/plain

even though a single attribute node is passed as second argument of fn:lang.

Either:

1) the test can be corrected, with something like:
let $i := &lt;e xml:lang=&quot;en&quot;&gt;
    &lt;b xml:lang=&quot;de&quot;/&gt;
&lt;/e&gt;
return lang(&quot;de&quot;, $i/b)

or
2) the expected result should be corrected, and &apos;false&apos; should be expected</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39816</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-09-28 22:19:08 +0000</bug_when>
    <thetext>I believe the test is correct as written.

Informally, the result is true if the nearest ancestor element of the target node that has an xml:lang attribute has @xml:lang=&apos;de&apos;. When the target node is the attribute @xml:lang=&apos;de&apos;, the nearest ancestor having an @xml:lang attribute is its immediate parent (the &lt;b&gt; element), and its @xml:lang attribute is indeed &quot;de&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>