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

Re: Regex string function question

Subject: Re: Regex string function question
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Wed, 24 Jan 2001 08:43:36 +0100
function of a nic
Nic,

Miloslav Nic wrote:
> 
> If it had my dream would come true.
> But unfortunately they do not appear in XSLT 1.1 proposal.
> What a pity.

It's also one of my dreams and I am sure we are not the only ones.

Why won't us put a prosal for a standardised extension ?

More precisly, my dream takes the form of functions taking a string (or
a XPath expression ?) and a regular expression as parameters and
returning a node set with the results.

Borowing an exemple from the PHP manual [1]:

preg_match_all("Call 555-1212 or 1-800-555-1212 or (612) 555-1313", 
	"/\(? (\d{3})? \)? (?(1) [\-\s] ) \d{3}-\d{4}/x")

would return a nodeset whose structure could be:

<matches>  <!-- maybe we don't need a document element here ? -->
 <match>
  <part>555-1212</part>
 </match>
 <match>
  <part>1-800-555-1212</part>
 </match>
 <match>
  <part>(612) 555-1313</part>
 </match>
</matches>

What do you think ?

Eric

[1] http://www.php.net/manual/en/function.preg-match-all.php

> --
> ******************************************
> <firstName> Miloslav </firstName>
> <surname>   Nic      </surname>
> 
> <mail>    nicmila@xxxxxxxxx    </mail>
> <support> http://www.zvon.org  </support>
> <zvonMailingList>
>     http://www.zvon.org/index.php?nav_id=4
> </zvonMailingList>
-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.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.