[xsl] count number of <P>s

Subject: [xsl] count number of <P>s
From: Dan Cederholm <dan@xxxxxxxxxxxx>
Date: Thu, 4 Apr 2002 16:56:20 -0500
Hi,

I'm trying to count the number of <P> tags withing a <![CDATA[ section.

Doing this:
<xsl:value-of select="string-length(.) - string-length(translate(., '&lt;P&gt;', ''))"/>


almost gets me there -- but counts each instance of <, P, and > separately. Is there a way of searching for an *entire* string, rather than individual characters?

Thanks!

Dan Cederholm

--
dan@xxxxxxxxxxxx


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



Current Thread