You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2015/01/23 17:07:56 UTC

svn commit: r937437 - in /websites/staging/sling/trunk/content: ./ documentation/the-sling-engine/url-to-script-resolution.html

Author: buildbot
Date: Fri Jan 23 16:07:55 2015
New Revision: 937437

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/the-sling-engine/url-to-script-resolution.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jan 23 16:07:55 2015
@@ -1 +1 @@
-1654097
+1654253

Modified: websites/staging/sling/trunk/content/documentation/the-sling-engine/url-to-script-resolution.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/the-sling-engine/url-to-script-resolution.html (original)
+++ websites/staging/sling/trunk/content/documentation/the-sling-engine/url-to-script-resolution.html Fri Jan 23 16:07:55 2015
@@ -157,10 +157,10 @@ covered there, please let us know via th
 </ul>
 <p>The constituents of these script names are as follows: </p>
 <ul>
-<li><code>{resourceTypeLabel}</code> - The last path segment of the path created from the resource type. This part is optional if the <code>{requestExtension}</code> is used in the script name. </li>
+<li><code>{resourceTypeLabel}</code> - The last path segment of the path created from the resource type. This part is optional if the <code>{requestExtension}</code> is used in the script name. The resource type might either be set via the <code>sling:resourceType</code> property on the accessed node or if that property is not there its primary node type (property <code>jcr:primaryType</code>) is taken as fallback.</li>
 <li><code>{requestExtension}</code> - The request extension. This part may be ommitted if the request extension is "html", otherwise this part is required. If this part is ommitted, the <code>{resourceTypeLabel}</code> is required in the case of ignoring the selectors. </li>
 <li><code>{scriptExtension}</code> - The extension, e.g. "esp" or "jsp", identifying the scripting langauage used. </li>
-<li><code>{selectorStringPath}</code> - The selector string converted to a path, along the lines of <code>selectorString.replace('.', '/')</code>. </li>
+<li><code>{selectorStringPath}</code> - The selector string converted to a path, along the lines of <code>selectorString.replace('.', '/')</code>. If less selectors are specified in the script name than given in the request, the script will only be taken into consideration if the given selectors are the <strong>first</strong> selectors in the request. This means <em>sel1/sel2.html.jsp</em> will be a candidate for the request url <em>/content/test.sel1.sel2.sel3.html</em> but not for <em>/content/test.sel3.sel1.sel2.html</em>. So the order of selectors is relevant!</li>
 </ul>
 <h2 id="priority">Priority</h2>
 <p>The rules for script path priorization is defined as follows: </p>
@@ -170,7 +170,7 @@ covered there, please let us know via th
 <li>A script found earlier matches better than a script found later in the processing order. This means, that script closer to the original resource type in the resource type hierarchy is considered earlier. </li>
 </ul>
 <h2 id="examples">Examples</h2>
-<p>Taking up again the list of potential script paths for a request of a resource whose resource type is sling:sample and the request selectors are "print.a4" and the request extension is "html" could be: </p>
+<p>Taking up again the list of potential script paths for a request of a resource whose resource type is <code>sling\sample</code> and the request selectors are <em>print.a4</em> and the request extension is <em>html</em> could be: </p>
 <ul>
 <li>(0) GET.esp </li>
 <li>(1) sample.esp </li>
@@ -178,11 +178,13 @@ covered there, please let us know via th
 <li>(3) print.esp </li>
 <li>(4) print/a4.esp </li>
 <li>(5) print.html.esp </li>
-<li>(6) print/a4.html.esp </li>
+<li>(6) print/a4.html.esp</li>
+<li>(7) a4.html.esp</li>
+<li>(8) a4/print.html.esp </li>
 </ul>
-<p>The priority of script selection would (6) - (4) - (5) - (3) - (2) - (1) - (0). Note that (4) is a better match than (5) because it matches more selectors even though (5) has an extension match where (4) does not.</p>
+<p>The priority of script selection would be (starting with the best one): (6) - (4) - (5) - (3) - (2) - (1) - (0). Note that (4) is a better match than (5) because it matches more selectors even though (5) has an extension match where (4) does not. (7) is not a candidate because it does not include the first selector (print) and (8) is not a candidate because it has the wrong order of selectors.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1483695 by bdelacretaz on Fri, 17 May 2013 08:53:34 +0000
+        Rev. 1654253 by kwin on Fri, 23 Jan 2015 16:07:43 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project