Re: [xsl] Regex string function question

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

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 ? -->
  <part>(612) 555-1313</part>

What do you think ?



> --
> ******************************************
> <firstName> Miloslav </firstName>
> <surname>   Nic      </surname>
> <mail>    nicmila@xxxxxxxxx    </mail>
> <support>  </support>
> <zvonMailingList>
> </zvonMailingList>
Eric van der Vlist       Dyomedea              

 XSL-List info and archive:

Current Thread