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

Re: Processing two documents, which order?

Subject: Re: Processing two documents, which order?
From: Liam R E Quin <liam@xxxxxx>
Date: Sat, 09 Apr 2011 11:55:32 -0400
Re:  Processing two documents
On Sat, 2011-04-09 at 08:20 +0100, Dave Pawson wrote:

> I want to say any lc character, AND not( : | -)

since : and - are not lowercase characters, just "any lowercase letter"
would work... or by AND do you mean "followed by"?

> <xsl:analyze-string select="." regex="[a-z][a-z\--\-\-:]+">
> works. But I don't know how.

[a-z] is a lower case letter (in ASCII...)
[a-z \- - \:] allows any character in two ranges:
(1) a .. z
(2) - .. :
using the default collation/sorting sequence, this gives (consulting an
ASCII or Unicode chart)
- . / 0123456789 :

This therefore matches pastry:36-little-pigs but not flat:pan_cake
> 
> [a-z-[p]] excepts p from the range a-z
> Is this connected with my misunderstanding?

It might be, but there are no nested square brackets in your example.
The stylesheet you appended had the range --- in it, rather than --: by
the way.

Note that we are using here XPath 2 regular expressions, not Java ones.
They are very close (and both are more or less subsets of Perl regular
expressions, which are much more powerful).

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://www.fromoldbooks.org/
Occasional blog: http://www.barefootliam.org/
The barefoot typographer

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.