This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

count number of <P>s


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@cederholm.tv


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]