
xdmp:current-last() as xs:integer
Returns the size of the current node list.
This function is only available in XSLT; it is not available in XQuery.
xquery version "1.0-ml";
xdmp:xslt-eval(
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xdmp="http://marklogic.com/xdmp">
<xsl:template match="foo">
<xsl:value-of select="xdmp:current-last()"/>
</xsl:template>
</xsl:stylesheet>,
document{<foo>
<a>hello</a>
<b>there</b>
</foo>})
=> 1
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.