You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Reto Bachmann-Gmür <me...@farewellutopia.com> on 2011/09/06 09:12:32 UTC

troubles with renderlet-priority

Hi,

I'm having troubles using the concept-tagger
(http://localhost:8080/concepts/generic-resource?uri=...). The cause
seems to be that there is nothing that enforces typerendering to use
the renderlets registered by platform.concepts.core rather that the
default template registered for .*-naked by platform.content. One
could enforce a priority by registering platform.concepts.core with a
higher start-level than platform.content, however I don't think this
is a good solution as a custom style couldn't shadow the default
.*-naked renderlet without also shadowing the something-naked
template.

The solution I can think of is to prioritize exact matches. We could
use the longest match, but this isn't trivial to find out as one would
have to determine the matching part of a regex. For a regex like
".*foobar|.*c", for strings ending with "foobar" the match should be
considered longer than for those ending with "c" but there doesn't
seem to be an easy way to find this out with java.util.regex.

Cheers,
Reto