<?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>7216</bug_id>
          
          <creation_ts>2009-08-05 13:24:44 +0000</creation_ts>
          <short_desc>[XQTS] ST-Axes* tests do not specify types of external variables</short_desc>
          <delta_ts>2009-08-17 18:33:22 +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>RESOLVED</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="Oliver Hallam">oliver</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</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>26231</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2009-08-05 13:24:44 +0000</bug_when>
    <thetext>ST-Axes001 is as follows:

(: Name: ST-Axes001 :)
(: Description: self:: axis with explicit name test called on set of nodes which do not contain any nodes of this name :)

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

fn:count($input-context//center/self::nowhere)


Note that as the query stands, the static type of $input-context is not declared and so it defaults to item();

Whilst it is acceptable for a test harness to rewrite the declaration, for example to:

declare variable $input-context as node() external;

this should not be necessary in order to pass a test.

Since this test is for the static typing feature, I suggest that the type of the argument should be more explicit, either by specifying it in the declaration (which could break some test harnesses), or by an explicit treat as in the query:

fn:count($input-context treat as node()//center/self:nowhere)


This same problem occurs in ST-Axes001 - ST-Axes015</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26491</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2009-08-17 18:33:22 +0000</bug_when>
    <thetext>As you&apos;ve noted, our guidelines allow a test harness to add &quot;as document-node()&quot; to an external variable declaration to allow static typing implementations to execute the tests correctly. We responded to this issue once before in Bug #3777.

I&apos;d like not to make any changes here and instead place the burden on your test harness.

Please close this bug if you agree with this resolution.

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>