Hi,
Working on SLING-305, I'd like to be able to request foo.apt, an APT
format file stored in the repository, as foo.html, and have the
SlingAptServlet process this request.
Currently I had to use an ugly workaround: foo.apt must be requested
as foo.apt.aptml, the SlingAptServlet is configured to handle the
aptml extension.
We had a brief chat with Felix about this, and it seems like the
following logic would enable such "transformer servlet or script"
scenarios, which can be useful beyond this particular use case:
1. If a Resource is not found with the extension given in the request,
the ResourceResolver tries a configurable list of additional
extensions ("apt" in this case).
2. A new "content extension" ResourceMetadata item stores this
information (content extension = apt in this example)
3. A Servlet can be mapped to handle a specific combination of content
extension (apt) and request extension (html), in addition to the
existing servlet selection parameters
4. If a Servlet is not found, Sling will look for the following
scripts in this example:
html.apt.esp
html.esp
GET.esp
And use the first one found (using esp or another script extension, of course).
WDYT?