Author: kwin
Date: Thu Sep 22 12:04:53 2016
New Revision: 1761917

URL: http://svn.apache.org/viewvc?rev=1761917&view=rev
Log:
minor fixes

Modified:
    
sling/site/trunk/content/documentation/the-sling-engine/url-decomposition.mdtext

Modified: 
sling/site/trunk/content/documentation/the-sling-engine/url-decomposition.mdtext
URL: 
http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/the-sling-engine/url-decomposition.mdtext?rev=1761917&r1=1761916&r2=1761917&view=diff
==============================================================================
--- 
sling/site/trunk/content/documentation/the-sling-engine/url-decomposition.mdtext
 (original)
+++ 
sling/site/trunk/content/documentation/the-sling-engine/url-decomposition.mdtext
 Thu Sep 22 12:04:53 2016
@@ -2,15 +2,16 @@ Title: URL decomposition
 
 [TOC]
 
-During the *Resource Resolution* step, the client request URI (as being 
returned by 
[HttpServletRequest.getRequestURI()](http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getRequestURI())`
 is decomposed into the following parts (in exactly this order):
+# Overview #
+During the *Resource Resolution* step, the client request URI (as being 
returned by 
[HttpServletRequest.getRequestURI()](http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getRequestURI()))
 is decomposed into the following parts (in exactly this order):
 
 1. **Resource Path** - For existing resources the resource path is the longest 
match (also considering its [mappings]({{ 
refs.mappings-for-resource-resolution.path }})) pointing to a resource where 
the next character is either a dot (`.`) or it is the full request URI.
-Otherwise (for a path not matching any existing resource) the resource path 
ends at the *first dot (`.`)* in the request url. The exact logic for 
retrieving the resource path is implemented at 
[ResourceResolver.resolve(HttpServletRequest,String](https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceResolver.html#resolve-javax.servlet.http.HttpServletRequest-java.lang.String-).
 *It is impossible to tell from just looking at the request URI where the 
resource path part ends. You have to know the underlying resource structure to 
know how a URL is decomposed*.
-1. **Selectors** -  If the first character in the request URL after the 
resource path is a dot, the string after the dot up to but not including the 
last dot before the next slash character or the end of the request URL. If the 
resource path spans the complete request URL no seletors exist. If only one dot 
follows the resource path before the end of the request URL or the next slash, 
also no selectors exist.
-1. **Extension** -  The string after the last dot after the resource path in 
the request URL but before the end of the request URL or the next slash after 
the resource path in the request URL. 
-1. **Suffix** -  If the request URL contains a slash character after the 
resource path and optional selectors and extension, the path starting with the 
slash up to the end of the request URL is the suffix path. Otherwise, the 
suffix path is empty. Note, that after the resource path at least a dot must be 
in the URL to let Sling detect the suffix.
+Otherwise (for a path not matching any existing resource) the resource path 
ends at the *first dot (`.`)* in the request url. The exact logic for 
retrieving the resource path is implemented at 
[ResourceResolver.resolve(HttpServletRequest,String)](https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceResolver.html#resolve-javax.servlet.http.HttpServletRequest-java.lang.String-).
 *It is impossible to tell from just looking at the request URI where the 
resource path part ends. You have to know the underlying resource structure to 
know how a URL is decomposed*.
+1. **Selectors** - If the first character in the request URL after the 
resource path is a dot  (`.`), the string after the dot up to but not including 
the last dot before the next slash character or the end of the request URL 
comprises the selectors. If the resource path spans the complete request URL no 
selectors exist. If only one dot follows the resource path before the end of 
the request URL or the next slash, also no selectors exist.
+1. **Extension** - The string after the last dot after the resource path in 
the request URL but before the end of the request URL or the next slash after 
the resource path in the request URL is the extension. 
+1. **Suffix** - If the request URL contains a slash character after the 
resource path and optional selectors and extension, the path starting with the 
slash up to the end of the request URL is the suffix path. Otherwise, the 
suffix path is empty. Note, that after the resource path at least a dot must be 
in the URL to let Sling detect the suffix.
 
-Those decomposed parts can be accessed through the `RequestPathInfo` object, 
which is retrieved via 
[SlingHttpServletRequest.getPathInfo()](https://sling.apache.org/apidocs/sling7/org/apache/sling/api/SlingHttpServletRequest.html#getRequestPathInfo--)
+Those decomposed parts can be accessed through the `RequestPathInfo` object, 
which is retrieved via 
[SlingHttpServletRequest.getPathInfo()](https://sling.apache.org/apidocs/sling7/org/apache/sling/api/SlingHttpServletRequest.html#getRequestPathInfo--).
 
 There's a cheat sheet in Adobe's AEM documentation at 
[https://docs.adobe.com/docs/en/aem/6-2/develop/platform/sling-cheatsheet.html](https://docs.adobe.com/docs/en/aem/6-2/develop/platform/sling-cheatsheet.html)
 available to get you familiar with the URL decomposition of Sling.
 
@@ -38,7 +39,8 @@ Assume there is a Resource at `/a/b`, wh
 # Automated Tests #
 
 The tests at
-* 
[ResourceResolverImplTest](http://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverImplTest.java)
 for the split between resource path and the rest. Mostly in the method 
`testbasicAPIAssumptions`.
+
+* 
[ResourceResolverImplTest](http://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/ResourceResolverImplTest.java)
 shows the split between resource path and the rest. Mostly in the method 
`testBasicAPIAssumptions`.
 * 
[SlingRequestPathInfoTest](http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/test/java/org/apache/sling/engine/impl/request/SlingRequestPathInfoTest.java)
 demonstrates the decomposition after the resource path part.
 
 Feel free to suggest additional tests that help clarify how this works!


Reply via email to