[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] xpath 2 regex


Subject: [xsl] xpath 2 regex
From: davep <davep@xxxxxxxxxxxxx>
Date: Thu, 04 Apr 2013 12:40:52 +0100

	<xsl:template
match="p[matches(normalize-space(), '^[the quick] |
[brown fox]' )]"

I'm having problems interpreting this.
  I think
<p>   the quick .....</p> matches
<p>the quick... </p> matches

what role does the  | take please?
  a simple alternate?

<p>.... brown fox ...</p> Matches?



http://www.w3.org/TR/xmlschema-2/#regexs
seems to show this

...
Doesn't [xxx] indicate a character class?
So what about
<p>.... xof nwbro</p> Would this match
or basically anything containing any (subset of) of that group of characters?


If so, what patter matches a p element which starts with
the string "the quick brown" or contains "brown fox" please?

regards






regards


--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


Current Thread
Keywords