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

Re: Arrays

Subject: Re: Arrays
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Jan 2005 14:03:53 GMT
Re:  Arrays
	<xsl:analyze-string select="$in" regex="\n">

beware on non-unix systems the end of line might be (will be) something
other than \n. On windows this would produce a spare \r at the end of
each line and an extra cell element containing that character in the
output, on a mac the whole thing would come out as one line.

I made a suggestion to the official comments list that unparsed-text()
ought to normalize line endings in the same way as an XML parser. this
was turned down, but they did add a new example highlighting the
problem. (\r|\n)+ (any non-empty sequence of #10 or #13) will do here,
although you have to work a bit harder if you want to pick up possibly
empty lines, ie detect two \n as an empty line (two unix style ends of
line) but \r\n as a single  windows-style end of line

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.