f:is-true
f:is-true — Determines if a given value represents “true”
Function:
{http://docbook.org/ns/docbook/functions}is-true#1
Defined in:
modules/functions.xsl
Used in:
docbook.xsl, main.xsl, modules/chunk.xsl, modules/chunk-cleanup.xsl, modules/chunk-output.xsl
Used by:
Synopsis
f:is-true( | $value ) as xs:boolean |
Description
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()
”.