XPath 2.0 extension functions

Smartsite 7.2 - ...

Although .NET only supports XPath 1.0, our XForms engine has been extended to support a great number of XPath 2.0 functions.

XPath 2.0

The XPath 2.0 extension functions are available within the namespace http://www.w3.org/2005/xpath-functions.
Usually, the fn namespace prefix is declared and used for this namespace.

Accessor functions

  • fn:node-name()
  • fn:nilled()
  • fn:string()
  • fn:base-uri()

Functions on numerics

  • fn:abs()
  • fn:ceiling()
  • fn:floor()
  • fn:round()
  • fn:round-half-to-even()

Functions on strings

  • fn:compare()
  • fn:concat()
  • fn:string-join()
  • fn:substring()
  • fn:string-length()
  • fn:normalize-space()
  • fn:normalize-unicode()
  • fn:upper-case()
  • fn:lower-case()

Functions based on substring matching

  • fn:contains()
  • fn:starts-with()
  • fn:ends-with()
  • fn:substring-before()
  • fn:substring-after()

String functions that use regular expressions

  • fn:matches()
  • fn:replace()

Functions related to QNames

  • fn:resolve-QName()
  • fn:QName()
  • fn:prefix-from-QName()
  • fn:local-name-from-QName()
  • fn:namespace-uri-from-QName()
  • fn:namespace-uri-for-prefix()

Functions on nodes

  • fn:name()
  • fn:local-name()
  • fn:namespace-uri()

 

Topics