| Implementer Page: dyn.map.htmlFunction Package: dyn.map.zip
 Function Syntaxnode-set dyn:map(node-set, string) 
        The dyn:mapfunction evaluates the expression passed as the second argument for each of the nodes passed as the first argument, and returns a node set of those values. 
        The expressions are evaluated relative to the nodes passed as the first argument. In other words, the value for each node is calculated by evaluating the XPath expression with all context information being the same as that for the call to the dyn:mapfunction itself, except for the following: the context node is the node whose value is being calculatedthe context position is the position of the node within the node set passed as the first argument to the dyn:mapfunction, arranged in document orderthe context size is the number of nodes passed as the first argument to the dyn:mapfunction
 
        If the expression string passed as the second argument is an invalid XPath expression (including an empty string), this function returns an empty node set.
       
        If the XPath expression evaluates as a node set, the dyn:mapfunction returns the union of the node sets returned by evaluating the expression for each of the nodes in the first argument. Note that this may mean that the node set resulting from the call to thedyn:mapfunction contains a different number of nodes from the number in the node set passed as the first argument to the function. 
        If the XPath expression evaluates as a number, the dyn:mapfunction returns a node set containing oneexsl:numberelement (namespacehttp://exslt.org/common) for each node in the node set passed as the first argument to thedyn:mapfunction, in document order. The string value of eachexsl:numberelement is the same as the result of converting the number resulting from evaluating the expression to a string as with thenumberfunction, with the exception thatInfinityresults in anexsl:numberholding the highest number the implementation can store, and-Infinityresults in anexsl:numberholding the lowest number the implementation can store. 
        If the XPath expression evaluates as a boolean, the dyn:mapfunction returns a node set containing oneexsl:booleanelement (namespacehttp://exslt.org/common) for each node in the node set passed as the first argument to thedyn:mapfunction, in document order. The string value of eachexsl:booleanelement is'true'if the expression evaluates as true for the node, and''if the expression evaluates as false. 
        Otherwise, the dyn:mapfunction returns a node set containing oneexsl:stringelement (namespacehttp://exslt.org/common) for each node in the node set passed as the first argument to thedyn:mapfunction, in document order. The string value of eachexsl:stringelement is the same as the result of converting the result of evaluating the expression for the relevant node to a string as with thestringfunction.ImplementationsThere are currently no XSLT processors that we know of that support dyn:mapnatively. There are currently no third-party implementations of dyn:map. |