Nicola Ken Barozzi wrote:



Sylvain Wallez wrote, On 18/03/2003 15.43:

Vadim Gritsenko wrote:

...


Matchers have side effect by returning map of values.


What about some "super-selector" (or "multi-match" ?) that would be allowed to return sitemap values ?


And make Matchers and Selectors able to use the a MathcerSelectors as a common implementation? That way I can make my ResourceExistsMathcerSelector and use it both in a Matcher and a Selector.


public abstract MatcherSelector implements Matcher, Selector


  match(...){ calls matchOrSelect}
  select(...){ calls matchOrSelect}
  public abstract matchOrSelect(...)
   { override this for common functionality}


Wow, I love that !

[entering RT mode, with capital letters !]

Taking this idea further (selectors returning sitemap values), we can consider that a <map:match> is equivalent to a <map:select> with a single <map:test>, and that a <map:select> is a sequence or <map:match>.

We can even have the sitemap engine handle all this transparently depending on the actual class of the component and handle all this transparently !

And we end-up with deprecating the <map:selectors> sections in the components by letting <map:matchers> hold any of the Matcher and Selector interfaces...

Thoughts ?

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }




Reply via email to