<?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>3844</bug_id>
          
          <creation_ts>2006-10-17 14:11:03 +0000</creation_ts>
          <short_desc>Static typing of external context item tests</short_desc>
          <delta_ts>2007-09-20 09:55:21 +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.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</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="Nick Jones">nick</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>tim</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>12511</commentid>
    <comment_count>0</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-17 14:11:03 +0000</bug_when>
    <thetext>The following tests all fail static type checking as they contain expressions which expect something with type quantified ZeroOrOne, but are passed in a child:: expression which can return more than elements.

For example, from externalcontextitem-5

for $var in $input-context1/works/employee[1]
return $var/xs:float(hours)


The other tests are similar. Could they be changed to exactly-one(hours).

Relavent tests are:

externalcontextitem-2
externalcontextitem-3
externalcontextitem-4
externalcontextitem-5
externalcontextitem-6
externalcontextitem-7
externalcontextitem-8
externalcontextitem-10
externalcontextitem-11
externalcontextitem-12
externalcontextitem-13
externalcontextitem-14
externalcontextitem-15
externalcontextitem-16
externalcontextitem-17
externalcontextitem-18
externalcontextitem-21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12514</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-10-17 19:50:27 +0000</bug_when>
    <thetext>It occurs to me that my making all these changes to accommodate static typing, the test suite is becoming less effective at testing dynamic typing. A dynamic typing implementation will typically work out for itself that it needs to add an exactly-one() test to the expression tree, and if it&apos;s already been added &quot;by hand&quot; then there&apos;s a path in my product that is no longer being tested.

So I don&apos;t think it&apos;s a good idea to change all the tests as is being requested. I&apos;d like some of them to stay as is, and to be marked in the catalog as failing under static typing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12515</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2006-10-17 20:16:34 +0000</bug_when>
    <thetext>Note: The testing suite is not meant to check implementation code paths but functionality interop. 

But I agree that it may be useful to duplicate such tests with and without the exactly-one().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12516</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-10-17 20:22:28 +0000</bug_when>
    <thetext>The task force has discussed this and I&apos;ve myself mentioned the problem that testing dynamic implementations becomes less effective with the fixes usually applied for incorrectly typed tests(lame pun intended).

Currently two approaches have been suggested: either an alternate query or additional baselines on a per-test basis for static typing implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12526</commentid>
    <comment_count>4</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-18 10:12:05 +0000</bug_when>
    <thetext>nametest-8
nametest-10
nametest-11

have similar problems</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12527</commentid>
    <comment_count>5</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-18 10:22:15 +0000</bug_when>
    <thetext>As have

copynamespace-3.xq
copynamespace-4.xq
copynamespace-5.xq
copynamespace-6.xq
copynamespace-7.xq
copynamespace-8.xq
copynamespace-9.xq
copynamespace-10.xq
copynamespace-11.xq
copynamespace-12.xq
copynamespace-13.xq
copynamespace-14.xq
copynamespace-15.xq
copynamespace-16.xq
copynamespace-17.xq
copynamespace-18.xq
copynamespace-19.xq
copynamespace-20.xq
copynamespace-21.xq
copynamespace-22.xq</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12813</commentid>
    <comment_count>6</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-11-03 11:16:33 +0000</bug_when>
    <thetext>*** Bug 3944 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16556</commentid>
    <comment_count>7</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2007-09-14 09:34:51 +0000</bug_when>
    <thetext>A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED. Otherwise, reopen this report. If no feedback is returned within two weeks, status will be changed to CLOSED. Thanks for reporting!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16573</commentid>
    <comment_count>8</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2007-09-14 11:19:53 +0000</bug_when>
    <thetext>Thanks. I think they are all work with static typing, except nametest-8 which has a parsing error (extra right parenthesis on the last line)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16708</commentid>
    <comment_count>9</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2007-09-20 09:55:21 +0000</bug_when>
    <thetext>All the externalcontextitem and nametest tests now appear to static type correctly, but am still getting problems for the copynamespace queries where things like:

in-scope-prefixes($new//child::*)

fail to type check as $new//child::* type as quantifier *, but in-scope-prefixes expectes a single element.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>