incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür ...@farewellutopia.com>
Subject troubles with renderlet-priority
Date Tue, 06 Sep 2011 07:12:32 GMT
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

Mime
View raw message