Name

f:parse-length — Parse a string into a length.

Function:
{http://docbook.org/ns/docbook/functions}parse-length#1
Defined in:
modules/units.xsl
Used in:
modules/variable.xsl, modules/units.xsl, modules/objects.xsl, modules/tablecals.xsl
Used by:
$v:nominal-page-width, $v:image-nominal-width, $v:image-nominal-height, f:length-units(), f:object-width(), f:object-height(), f:object-contentwidth(), f:object-contentheight()

Synopsis

f:parse-length($length as xs:string) as map(*)

Description

This function parses a string such as “4in” or “3.14cm” or “50%” into a length. It will fall back to a distance of the $default-length-magnitude and $default-length-unit if the string cannot be parsed as a length.