RE: [xsl] counting characters in an XML document

Subject: RE: [xsl] counting characters in an XML document
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 25 Oct 2001 10:30:52 +0100
> Does anyone know how I can use XSL to count the number of
> characters in an
> XML document.

If you're only interested in characters within text nodes, then

count(string-length(/))

If you're also interested in characters within attributes, comments, etc,
then it's harder.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread