[Bug 29505] New: [FO31] Section https://www.w3.org/TR/xpath-functions-31/#func-map-for-each defines function named map:for-each but example used function named map:for-each-entry

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29505

            Bug ID: 29505
           Summary: [FO31] Section
                    https://www.w3.org/TR/xpath-functions-31/#func-map-for
                    -each defines function named map:for-each but example
                    used function named map:for-each-entry
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: martin.honnen@gmx.de
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The section https://www.w3.org/TR/xpath-functions-31/#func-map-for-each defines
the function "map:for-each" and then gives the example

------------ sample code ----------------------

   <xsl:variable name="dimensions" 
                 select="map{'height': 3, 'width': 4, 'depth': 5}"/>

   <xsl:function name="f:make-attribute" as="attribute()">
     <xsl:param name="key" as="xs:string"/>
     <xsl:param name="value" as="xs:anyAtomicType"/>
     <xsl:attribute name="{$key}" select="string($value)"/>
   </xsl:function>

   <xsl:template name="convert">
     <box>
       <xsl:sequence select="map:for-each-entry(
                               $dimensions, f:make-attribute#2)"/>
     </box>
   </xsl:template>  

----------- end of sample code ----------------

which uses a function named "map:for-each-entry" instead of "map:for-each".

So the sample should be

------------ sample code ----------------------

   <xsl:variable name="dimensions" 
                 select="map{'height': 3, 'width': 4, 'depth': 5}"/>

   <xsl:function name="f:make-attribute" as="attribute()">
     <xsl:param name="key" as="xs:string"/>
     <xsl:param name="value" as="xs:anyAtomicType"/>
     <xsl:attribute name="{$key}" select="string($value)"/>
   </xsl:function>

   <xsl:template name="convert">
     <box>
       <xsl:sequence select="map:for-each(
                               $dimensions, f:make-attribute#2)"/>
     </box>
   </xsl:template>  

----------- end of sample code ----------------

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 25 February 2016 11:43:19 UTC