On Sun, Jul 30, 2000 at 08:49:25PM -0400, rubys@us.ibm.com wrote:
>
> I'd like to suggest that the sitemap be modified to support the choice of
> EITHER a traditional pattern or a regexp. The way that pattern would be
> implemented would be to call a function which adds a "^" before the pattern
> and a "$" after, as well as maps
>
> { "?"=>".", "*"=>".*", "."=>"\\." }
>
> This is just a partial list - most of the special characters in a regular
> expression would need to be escaped. One exception - we should continue to
> allow the use of parenthesis.
>
> What do you think?
Ehm, the sitemap doesn't have any notion of what kinda pattern should
be used. This is the responsability of a SitemapComponent called
Matcher. You can write any matcher with any syntax you like to
integrate into the sitemap (as long as it implements the Matcher
interface). There is a WildcardUriMatcher in the cvs tree as an
example. It was copied from Piers Matcher in the early C2 times. It is
not bug free functional, but could be used to start such a Matcher you
suggests.
Of course we still need a bunch of SitemapComponents. Mainly Selectors and Matchers. So if
any volunteer would write such pieces, go on and contribute :)
Giacomo
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen Web: http://www.pwr.ch
|