On Tue, Jan 13, 2009 at 5:43 PM, Rory Douglas <[email protected]> wrote:
> Sorry, I incorrectly copied down the script names for (3) and (4) they are:
>
> (3) /apps/test/B/edit.small.html.jsp
> (4) /apps/test/B/view.small.html.jsp
>
> However, your suggestion works ((A) /apps/test/B/edit/small.html.jsp). It's
> a little confusing to me though, since (B) /apps/test/B/edit/small/html.jsp
> also works.
>
> Does that imply that at only the first dot-separated component of the
> scriptname can be considered as part of the selector string? Wouldn't it be
> more consistent to either:
>
> a) consider all dot-separated components part of the selector except the
> last 2 (those last 2 being the extension and the script language identifier)
> (like (3) and (4) or
> b) only allow the script name to be <extension>.<script language
> identifier>, and selectors have to be /-separated components of the path
> (like (B) above)
>
> Is there a specific reason for the current implementation behavior?
It was once changed so that filenames can "look" different if you have
them open at the same time in your favorite editor or IDE that only
displays the filename in the tab. And since you are typically using
the same scripting language for those files, you could end up with a
lot of "html.jsp" files for example (/apps/test/B/edit/small/html.jsp
and /apps/test/B/view/small/html.jsp).
This, btw, was at first the "normal" case, ie. selectors had to be
folders and the filename of the script was always <extension>.<script
language>, as you mention in b). This was modified to allow filenames
such as "small.html.jsp", but not sure why Sling only allows to use
the last selector as part of the script file name ("small" in your
case). Might be a bug.
Regards,
Alex
--
Alexander Klimetschek
[email protected]