Description
The functx:line-count function counts the number of lines in a string, using the carriage return and newline characters to indicate the end of a line.
Arguments and Return Type| Name | Type | Description |
$arg |
xs:string? |
the string to test |
| return value |
xs:integer |
XSLT Function Declaration| See XQuery definition. | | XSLT 2.0 Syntax: |
|---|
<xsl:function name="functx:line-count" as="xs:integer"
xmlns:functx="http://www.functx.com" >
<xsl:param name="arg" as="xs:string?"/>
<xsl:sequence select="
count(functx:lines($arg))
"/>
</xsl:function>
|
Examples<xsl:variable name="lines" as="item()*"> | | </xsl:variable> |
| XSLT Example | Results |
|---|
functx:line-count('a value')
|
1
|
functx:line-count($lines)
|
5
|
Depends OnSee AlsoHistory |
|