[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

regexp? or find # of "."s in string

Subject: regexp? or find # of "."s in string
From: "Anthony E." <apwebdesign@xxxxxxxxx>
Date: Mon, 21 May 2001 13:29:33 -0700 (PDT)
xsl string find
I currently am testing what level a node is at, based
on the "id" attribute of the node.

ie - 

<tab id="2.3.2.3" state="off">

I currently test for string-length of @id, but if my
numbers go over 10, then the string-length is not a
valid way of determining tab level (ie - 2.1 or 2.1.1,
2.1.10 would break)

I'm currently using:
<xsl:if test="string-length(@id) = '7'">


If I can somehow count the number of periods "." in
the string "id", then I can determine what level the
<tab> element is at...anyone have any ideas how to
count the number of occurences in a string with XSL?

Thanks,
Anthony E.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.