list4xt : Mailing list for the XT users community.
[list4xt] Re: Regexpr or not no Regexpr. ( Re: Support foromquery(XPath query) )
Subject: [list4xt] Re: Regexpr or not no Regexpr. ( Re: Support foromquery(XPath query) )
User: Website From: Paul Tchistopolskii (pault12@pacbell.net)
Date: 05/06/2000 - 19:46
From: Eric van der Vlist
> > Is there some usecase which strongly forces regular expressions ?
>
> I must admit I haven't a real usecase... wouldn't it be convenient to
> search (and replace) substrings (the XPath string functions are pretty
> limited) ?
It may be convinient, but should it live in the core instead of
extension ? <xsl: value-of select = "re:replace($string, $old, $new)"/>
> RDBMS are storing strongly structured data but still need a "like"
> clause (and some of them (PostgreSQL) are providing regexp extensions
> which are very convenient), I don't see why it wouldn't be the case with
> XML documents !
Some of 'LIKE' cases in SQL exist only because SQL is about 'strongly
structured data', so people are serializing / deserializing objects into
strings. With XML the same things will be serialized/deserialized into XML.
I agree, there is one typical usage of LIKE for text searching. ( To find
something related to some word in set of messages, for example).
My exprience shows that instead of using LIKE-based design pattern, it
is better to use some extra layer specialized on the 'real' search with indexes
and other stuff ( and it is even better not to store messages in a database
at all ;-)
I think it could be better if LIKE not exist in SQL, because
it usually forces 'bad' application logic. Even it provides a
convenient and 'fast' solution. Like perl does ;-)
Rgds.Paul.
--
Mailing list for the XT users community. (http://superdavesgunshow.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET
webmaster@4xt.org
|