<?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>30024</bug_id>
          
          <creation_ts>2016-11-30 17:08:45 +0000</creation_ts>
          <short_desc>[F+O 3.1] Is map:entry superfluous?</short_desc>
          <delta_ts>2016-12-16 19:55:25 +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>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>josh.spiegel</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>128264</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-30 17:08:45 +0000</bug_when>
    <thetext>Comment from Thomas Fischer on public-qt-comments:

Hi,
the documentation for map:entry says:

Unlike the map expression (map{...}), this technique can be used to construct a map with a variable number of entries, for example:
    map:merge(for $b in //book return map:entry($b/isbn, $b))

At least with Saxon-HE 9.7.0.8J you can achieve the same result with a simple map constructor
    map:merge(for $b in //book return map{$b/isbn: $b})

I wonder, if this is just a &quot;special feature&quot; of Saxon or if there is any other reason to keep map:entry in the proposal

salute
Th. Fischer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128265</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-11-30 17:17:01 +0000</bug_when>
    <thetext>Provisional personal response: yes, I think map:entry() is now in a technical sense redundant. However, the fact that something can be done using custom syntax doesn&apos;t necessarily mean it&apos;s wrong to have a function as well, and at this stage of the game, I don&apos;t think redundancy is a good enough reason to pull something out of the spec.

At one time I believe that the XSLT working group was trying to ensure that maps could be manipulated using XPath 2.0 without syntax extensions, purely as a function library, and that may still be a relevant argument for some people.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128269</commentid>
    <comment_count>2</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2016-11-30 17:37:34 +0000</bug_when>
    <thetext>Maybe deleting the text &quot;Unlike the map expression (map{...})&quot; would avoid implying there is some technical limitation where map:entry is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128284</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-12-05 14:44:38 +0000</bug_when>
    <thetext>I have implemented Josh&apos;s suggestion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128291</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-12-06 16:26:03 +0000</bug_when>
    <thetext>The WG decided that there were adequate reasons to retain the function and the text justifying its inclusion has been improved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>