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

Re: check the type of the $pattern argument to a regul

Subject: Re: check the type of the $pattern argument to a regular expression?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 16 Apr 2007 16:13:17 -0700
Re:  check the type of the $pattern argument to a regul
That it can't be
done using a regular expression is one thing, that it can't be done
with XSL-T 2.0 is incorrect, given that all one would need to check
the validity of regular expressions is a turing complete language.


In fact,  have a general purpose LR(1) parser written cmpletely in
XSLT 2.0, which will parse any input and return the sequence of
poduction used in the parse.

Provide any LR-1 grammar written in BNF and you'll get the checker.



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play


On 4/16/07, bryan rasmussen <rasmussen.bryan@xxxxxxxxx> wrote:
>
> It would make far more sense for you to test your regular expressions by
> some other means before putting them into your XSL.

I would have to disagree, the regular expression pattern can come from
a variable this means it can be dynamically constructed which means
that the way to make sure that the expression is correct is to test it
in the stylesheet before running.

The test as to whether a regular expression is validly formed or not
is not affected by the infinite number of possible regular
expressions, it is determined by if the syntax is correct for regular
expressions, since I'm not great at regular expressions I wanted to
see if anyone else had already made such a check. That it can't be
done using a regular expression is one thing, that it can't be done
with XSL-T 2.0 is incorrect, given that all one would need to check
the validity of regular expressions is a turing complete language.

Cheers,
Bryan Rasmussen

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.