Hi Bertrand,

As Felix indicates, we have designed something like this in the API
(although it's not yet implemented in microsling) with the
RequestDispatcherOptions class, which is just a Map of options.

This allows you to render either the current Resource, or another one,
and override its resource type, selectors or suffix.

Would this provide what you need?

One thing that's different from your proposal is that to render using
the "mix:versionable" aspect, for example, you'd currently need to
specify the full path of the mix:versionable script or servlet, like
/sling/scripts/NODETYPES/mix/versionable. We might want to think of a
better way of doing that, maybe specifying "nodetypes:mix:versionable"
as the forced resource type.

I will have to have a look at this class, then we can find an convenience method that works just by specifying the nodetype (and that does nothing if there is no script or servlet for this nodetype)



...Open questions for me are following:
...- do we want to add something like Sling.skip() that will skip the
execution of a script and Sling.skipIfNext() that skips the execution
if and only if there is another script in the execution chain that
does not skip....

Not sure what you mean, what's your use case or XSLT equivalent?

There is no direct XSLT equivalent, except something like having two templates, one matching //a and one //[EMAIL PROTECTED] where the first will only match for a given "a" element if the second does not match (i.e. there is no better match)

regards,

Lars

Reply via email to