xsl-list
[Top] [All Lists]

Re: [xsl] finding word count within a document, with xsl:accumulator

2021-01-21 05:34:57



On 21/01/2021 11:04, Mukul Gandhi mukulg(_at_)softwarebytes(_dot_)org wrote:
I'm exploring ways with XSLT 3.0's xsl:accumulator instruction in a non streaming way, to count number of words within text documents
(both XML and .txt input files).
[...]
XML input document:

[snip]

<xsl:value-of select="count(tokenize(normalize-space(document),' '))"/>

I haven't found a use case for xsl:accumulator yet.

Peter
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>