f:is-true — Determines if a given value represents “true”

Defined in:
Used in:
main.xsl, modules/variable.xsl, modules/head.xsl, modules/titles.xsl, modules/toc.xsl, modules/index.xsl, modules/info.xsl, modules/blocks.xsl, modules/verbatim.xsl, modules/xlink.xsl, modules/xref.xsl, modules/profile.xsl, modules/chunk-cleanup.xsl, modules/chunk-output.xsl, drivers.xsl
Used by:
$v:verbatim-number-first-line, $v:chunk-renumber-footnotes, t:generate-index, t:person-name-first-last, f:verbatim-numbered(), f:verbatim-trim-trailing(), t:preprocess


f:is-true($value) as xs:boolean


There are several conventions for indicating “true” or “false”. XSLT uses the words “yes” and “no” in many places. The XML Schema data type for xs:boolean uses “true” and “false” but also “1” and “0”.

The f:is-true() function returns true() for any of “true()”, “yes”, “true”, or a value that can be cast to an integer if that integer is not zero. It returns false() for any of “false()”, “no”, “false”, a value that can be cast to an integer that is zero, or the empty sequence.

It reports an error for any other value and returns “true()”.