<?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>5690</bug_id>
          
          <creation_ts>2008-05-16 07:48:29 +0000</creation_ts>
          <short_desc>CVS: Static Typing: FunctX tests needs adjustment</short_desc>
          <delta_ts>2008-11-13 16:43:29 +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>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Frans Englich">frans.englich</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>nick</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>20127</commentid>
    <comment_count>0</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-16 07:48:29 +0000</bug_when>
    <thetext>Most likely the FunctX contains static typing errors and therefore needs alternative queries for static typing queries.

This is currently being looked into, but feel free to add further comments on this topic here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20130</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-05-16 08:31:34 +0000</bug_when>
    <thetext>I feel strongly that we should not exclude real-life test cases such as the functx tests from our suite simply because they do not meet a self-imposed rule on static typing. The fact is, many implementations of XQuery do dynamic typing, and it&apos;s useful to implementors and users to know that these implementations are interoperable. We should mark the tests in the catalog as not passing static typing, but otherwise leave them unchanged.

As for the namespace not being example.com, it seems a frivolous objection. Who benefits from the work needed to make the change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20136</commentid>
    <comment_count>2</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-16 09:38:36 +0000</bug_when>
    <thetext>We added a new static-name attribute on element query some time ago, it looks like this:

&lt;query name=&quot;Constr-comppi-compname-8&quot; static-name=&quot;Constr-comppi-compname-8-static-cbcl&quot; date=&quot;2005-05-20&quot;/&gt;

So, when adapting to static typing, a new query is added instead of that the original query suffer. So with this approach I think it&apos;s not destructive to extend the coverage to include static typing implementations. Appears to already be used in a 160 cases.

Regarding, example.com: well, this case happened to be easy to fix:

commit 74d67939ad38af1c81c2ad441bfd03dfe74ac32e
Author: Frans Englich &lt;fenglich@fastmail.fm&gt;
Date:   Fri May 16 10:40:11 2008 +0200

    Use example.com instead.

diff --git a/generateFiles.xsl b/generateFiles.xsl
index 5868893..cdd0be6 100644
--- a/generateFiles.xsl
+++ b/generateFiles.xsl
@@ -41,7 +41,7 @@
 (: Date: &lt;xsl:sequence select=&quot;current-date()&quot;/&gt;                                       :)
 (:**************************************************************:)

-declare namespace functx = &quot;http://www.functx.com&quot;;&lt;/xsl:value-of&gt;
+declare namespace functx = &quot;http://www.example.com/&quot;;&lt;/xsl:value-of&gt;^M
             &lt;xsl:apply-templates select=&quot;local:allDependenciesFor($from)//dat:nsDecl&quot;/&gt;

             &lt;!-- We add a dot, so we eliminate duplicates. --&gt;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20143</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2008-05-16 16:03:31 +0000</bug_when>
    <thetext>For most of the changes I&apos;m seeking to make static-typing specific tests using static=name=&quot;...&quot;, but for functx-functx-substring-before-match-* I&apos;d like to change the return type for the normal version, unless anyone objects. So currently we have:

declare function functx:substring-before-match
  ( $arg as xs:string? ,
    $regex as xs:string )  as xs:string {

   tokenize($arg,$regex)[1]
 } ;


The current function will return an empty sequence if $arg is empty, so really should be defined as xs:string?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20144</commentid>
    <comment_count>4</comment_count>
    <who name="Nick Jones">nick</who>
    <bug_when>2008-05-16 16:33:38 +0000</bug_when>
    <thetext>Similarly for functx-functx-max-line-length-* the function:

declare function functx:max-line-length
  ( $arg as xs:string? )  as xs:integer {

   max(
     for $line in functx:lines($arg)
     return string-length($line))
 } ;

May return at empty-sequence if $arg is an empty sequence, so I think should have return type xs:integer? in the normal version rather than a static-typing specific version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20150</commentid>
    <comment_count>5</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-16 18:06:51 +0000</bug_when>
    <thetext>Yeah, I&apos;ll fix those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20900</commentid>
    <comment_count>6</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-26 11:32:43 +0000</bug_when>
    <thetext>Requests in comment #3 and #4 should be fixed in CVS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22436</commentid>
    <comment_count>7</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-11-13 16:43:29 +0000</bug_when>
    <thetext>I&apos;m closing this report, the demand comes from Nick &amp; co, who will provide the patch for this if they see the need.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>