Re: [xml-dev] wc in XML document

From
Dave Pawson <>
To
Steve Ball <>
Date
2005-09-17T12:54:49Z
ID
<1126961689.3742.18.camel@marge>
Thread
Re: [xml-dev] wc in XML document
Thanks Steve, Bob, Michael.
Mostly win32 based hence wc not readily available;
 I'd get dirty look if I asked to install Tcl Steve!

Wasting even more than 9 characters :-)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.1">
<xsl:template match="/">
       <xsl:message>
       <xsl:value-of select="
string-length(normalize-space(.)) -
string-length(translate(normalize-space(.),' ',''))
"/>
    </xsl:message>
  </xsl:template>
</xsl:stylesheet>

This seems to match wc output from the piped 'null' stylesheet.

Thanks. 

I guess the way to a .exe would be sax filter based,
accumulating wc in the text handler?

regards DaveP
>