<?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>3784</bug_id>
          
          <creation_ts>2006-10-02 18:59:40 +0000</creation_ts>
          <short_desc>fn:trace is cumbersome with static typing</short_desc>
          <delta_ts>2008-10-14 17:53:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Formal Semantics 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</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>
          
          <blocked>3782</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Frans Englich">frans.englich</reporter>
          <assigned_to name="Jerome Simeon">simeon</assigned_to>
          <cc>jmdyck</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>12237</commentid>
    <comment_count>0</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-10-02 18:59:40 +0000</bug_when>
    <thetext>This is from a problem encountered in report #3782:

Since the return type for fn:trace isn&apos;t inferred from the input it is tracing, one must in most cases insert a &apos;treat as&apos; expression each time one inserts an fn:trace call. I would find this very cumbersome. For example, this query is a static typing error:

trace(&quot;this Input is traced&quot;, &quot;The trace message.&quot;) eq &quot;a string&quot;

because the left operand to &apos;eq&apos; has item()* as static type.

I suggest that a section is added for fn:trace, and that its return type is inferred similarly to fn:reverse().

This is a large change, but the specification also has a large hole here, in my opinion. fn:trace() is very unpractical on a static typing implementation as it is now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12252</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-10-03 15:31:21 +0000</bug_when>
    <thetext>This is a good remark. I think that function never got the attention it deserved on the static typing front. However, this is really late in the process to change this, especially that it requires changes to two documents (F&amp;O will have to point to static typing rules, the FS will have to invent new static typing rules).

Personally, I think this issue could be dealt with by implementation using a static typing extension for that version. The static typing extension should provide enough flexibility to do this.

- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12307</commentid>
    <comment_count>2</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-10-05 15:50:23 +0000</bug_when>
    <thetext>I don&apos;t think there&apos;s that much to say. Here&apos;s a clear hole in the spec, but if the necessary changes can&apos;t be done, that&apos;s the end to the story. I have acceptance for closing as WONTFIX, although I would grumble as everyone else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12551</commentid>
    <comment_count>3</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-10-19 19:38:45 +0000</bug_when>
    <thetext>The XML Query and XSLT WGs have decided to reject the proposed change and leave the static semantics of fn:trace as is. This may be considered for a future version.
Best,
- Jerome, On Behalf of the WGs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22170</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2008-10-14 17:53:37 +0000</bug_when>
    <thetext>(Note that this suggestion was raised against FS 1.1, and approved, in Bug 5786.) </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>