<?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>8775</bug_id>
          
          <creation_ts>2010-01-17 21:38:03 +0000</creation_ts>
          <short_desc>[XQuery 1.1] Private functions in module namespace</short_desc>
          <delta_ts>2013-06-19 08:06:16 +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>XQuery 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</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>31097</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-01-17 21:38:03 +0000</bug_when>
    <thetext>The specification states:

Every function name declared in a library module must (when expanded) be in the target namespace of the library module

This seems an unnecessary constraint in the case of private functions: we should not impose restrictions that serve no useful purpose. Many users might find it more natural to use the &quot;local:&quot; namespace for private functions.

Incidentally, I also checked to see what the uniqueness rules were for private functions. I noticed it says: 

It is a static error [err:XQST0034] if the expanded QName and arity (number of arguments) of the declared function are equal (as defined by the eq operator) to the expanded QName and arity of another function in *function signatures*.

and the definition of &quot;function signatures&quot; is: &quot;the set of functions that are available to be called from within an expression&quot;. Like other aspects of the static context, it is defining the static context in relation to an expression; but for the uniqueness rules, it&apos;s not obvious what this expression is. It might be better to say &quot;equal () to the expanded QName and arity of another function declared or imported in the containing Prolog&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31242</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-01-26 19:14:35 +0000</bug_when>
    <thetext>Is there an important reason to make such a change? I&apos;m in favor of keeping things stable unless there&apos;s a good reason to change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31421</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-02-03 14:52:04 +0000</bug_when>
    <thetext>In yesterday&apos;s telcon, we decided to close this with no action.

Changing a function from private to public should not require changing the name of the function. If the rules for naming private functions are different from the rules for naming public functions, then we may need to rename a function to make it public.

Also, the benefits of allowing other namespaces seem minimal, and do not justify introducing changes to the specification at this point. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31428</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-02-03 15:37:04 +0000</bug_when>
    <thetext>Spawned a new bug to cover function signature scope:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=8873
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>