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

RE: Count line number

Subject: RE: Count line number
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 22 Oct 2005 10:02:37 +0100
count line number
string-length(/) - string-length(translate(/,'&#xa',''))

Note however this only counts the newlines appearing in text nodes. It won't
count any that appear, for example, between the attributes in a start tag,
because those aren't visible to XSLT. It also doesn't count newlines within
comments or processing instructions, which you could include if you were
minded to.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Rajesh Kumar [mailto:rajesh-kumar@xxxxxxxxx] 
> Sent: 22 October 2005 02:22
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Count line number
> 
> Hi group, 
> 
> I want to count total number of line of xml file through xsl. 
> Could to send me code
> 
> -------
> Thanks & Regards,
> Rajesh Kumar
> 
> 
> -- 
> India.com free e-mail - www.india.com. 
> Check out our value-added Premium features, such as an extra 
> 20MB for mail storage, POP3, e-mail forwarding, and ads-free 
> mailboxes!

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.