|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting occurences of a character in a string
David Carlisle wrote: >count(tokenize($s,'X'))-1 Ahh - and that is a use case for the zero-length elements (tokens) generated when the separator pattern is matched directly at the start or end of a string. I was wondering about that behaviour, and it was actually my first pitfall in my initial attempt at a solution. Thanks to all who responded so quickly! I'll make an xsl:function and pick one of the implementations. Since that function will not be called often, I guess I will not see a measurable (or better: relevant) performance difference. Christian
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







