Loading TOC...

MarkLogic 9 Product Documentation
fn:current

fn:current() as item()

Summary

Returns the item that was the context item at the point where the expression was invoked from the XSLT stylesheet.

This function is only available in XSLT; it is not available in XQuery.

Example

xquery version "1.0-ml";

xdmp:xslt-eval(
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="/">
   <xsl:value-of select="node-name(current()/element())"/>
 </xsl:template>
</xsl:stylesheet>,
document{<foo>hello there</foo>})

=> foo

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.