This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: counting characters in an XML document
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] counting characters in an XML document
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 25 Oct 2001 10:30:52 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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