<?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>3867</bug_id>
          
          <creation_ts>2006-10-26 12:30:16 +0000</creation_ts>
          <short_desc>Static type checking of Constr-docnode-parent-1</short_desc>
          <delta_ts>2007-01-22 12:42: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="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>12614</commentid>
    <comment_count>0</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-26 12:30:16 +0000</bug_when>
    <thetext>The expression

count((document {()})/..)

is testing document has an empty parent.

The formal semantics state

statEnv |-  axis parent:: of DocumentType : empty

Therefore I think we can infer this during static analysis and it is valid to throw [err:XPST0005].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12615</commentid>
    <comment_count>1</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2006-10-26 16:27:44 +0000</bug_when>
    <thetext>Similarly in fn-name-16

for $h in ($input-context1/works/employee[2]) 
return fn:count(fn:name($h/self::div))

$h has a static type of &quot;element employee&quot;

$h/self::div is expecting &quot;element div&quot; so the expression types as empty

(8.2.3.1.1 of the formal semantics is the relevant section)

Therefore I think [err:XPST0005] is valid (and is effectively what the test is trying to test - but in a dynamic fashion)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13164</commentid>
    <comment_count>2</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-12-13 16:06:41 +0000</bug_when>
    <thetext>Nick:

Correct.  Changed the catalog entry for &quot;fn-name-16&quot; to reflect your suggestion.  &quot;Constr-docnode-parent-1&quot; seems to have the same illness.
Changed the entry as well.  Please close the bug if in agreement.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13762</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2007-01-22 12:42:21 +0000</bug_when>
    <thetext>fn-name-16 seems to be fixed in the latest catalog file, but Constr-docnode-parent-1 doesn&apos;t appear to be changed.

Nick</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>