cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Carvalho <sergio.carva...@acm.org>
Subject Re: Tree Traversal Apologies
Date Wed, 10 Oct 2001 09:17:35 GMT
On Tue, 09 Oct 2001 19:16:36 -0400, Jason Foster wrote:
From: Jason Foster <jafoster@uwaterloo.ca>
--

> As a side note, what is the opinion out there of a RegExpTable, which is
> like a HashTable, except that all of the keys are RegExp patterns?  The
> RegExpTable returns an array of objects whose regular expression keys match
> the query string equally well?  This seemed like one (very naïve) way to
> deal with the different pipelines (at least those that use regular
> expressions).

hmm. Why not take the concept a bit further, and implement a MatchDictionary,
implementing the Java dictionary interface, which delegates the actual matching
to Matcher components. I'm thinking that this MatchDictionary can internally
order Matches so that most frequently used ones are tested first to minimize
match tests. A warning though: in the current implementation, matches are not
required to be mutually exclusive, so match order is relevant. And with the
current interfaces, it is not possible to prove that two matches are mutually
exclusive. Implementing this optimization would break the current API -- even if
this is an undocumented behaviour.

--
Sergio Carvalho
---------------
sergio.carvalho@acm.org

If at first you don't succeed, skydiving is not for you

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message