cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject RE: New PreparedMatcher, deprecation of CodeFactory
Date Mon, 22 Oct 2001 07:36:06 GMT
Hi Sylvain,

thanks for this work, but we should make the PreparedMatcher work
in subsitemaps. 
I didn't had time to look into the generated code for very long,
but I think the problem lies in the test, if the matcher is
a PreparedMatcher. This is currently done in the stylesheet.
If we move this into the generated code it should work. So the
generated code could look like this:
- lookup matcher
- if (matcher instanceof PreparedMatcher)
-    prepare patterns
- release matcher

The second problem, when the pattern contains {...}, is it possible
to test the pattern when the sitemap is generated and then only
use the PreparedMatcher interface, if no {...} is found?


Carsten

> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> Sent: Friday, October 19, 2001 5:57 PM
> To: cocoon-dev
> Subject: New PreparedMatcher, deprecation of CodeFactory
> 
> 
> Hi team,
> 
> You'll find in the HEAD the new PreparedMatcher interface we talked
> about and a new implementation of all factory-based matchers with this
> interface (way simpler).
> 
> CodeFactory is now deprecated and shouldn't be used for new matchers and
> selectors. I will also port Selector so that we can totally stop using
> it. This is the key for the tree-traversal implementation of the
> sitemap.
> 
> CodeFactory matchers and selectors needed to be redeclared in
> subsitemaps, and unfortunately this is still the case with
> PreparedMatchers : it isn't possible to know when generating code for a
> subsitemap the actual class for an inherited matcher, and thus we cannot
> know if it's a simple Matcher or a PreparedMatcher. This won't be the
> case with the interpreted sitemap.
> 
> Another behavior which also existed with code factories : since patterns
> are prepared once at sitemap startup, patterns for PreparedMatchers
> cannot use "{...}" substitution while simple Matchers can. This will
> still be the case with an interpreted implementation.
> 
> Samples seem to behave correctly with these changes.
> 
> Sylvain.
> -- 
> Sylvain Wallez
> Anyware Technologies - http://www.anyware-tech.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

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


Mime
View raw message