User's Manual

24 Chapter 5. WAF Component: Presentation
locale
This pattern generator expands to the current kernel execution context locale. ie the value re-
turned by a call to com.arsdigita.kernel.Kernel.getContext().getLocale();.
outputtype
If the outputType request parameter is set, this expands to one of text-plain,
text-javascript, or text-html if the parameter value is text/plain,
text/javascript or text/html respectively. In all other cases no values are generated.
prefix
If the current request has passed through an instance of the
com.arsdigita.web.InternalRedirectServlet, then this pattern generator expands to
the value of the prefix init parameter in the web.xml servlet declaration. In all other cases no
values are generated.
url
This pattern generator expands to multiple values based on the URL fragment remaining after the
application’s mount point. The set of values are generated by progressively stripping off trailing
path components. The values are then normalized as follows:
1. The file extension is removed.
2. Trailing occurrences of /index are replaced with /.
3. If the path is the empty string, it is replaces with index.
4. Occurrences of / are replaced with -.
Some examples are:
/index.jsp -
{ "index" }
/ - { "index" }
/admin/index.jsp - { "admin", "index" }
/admin/ - { "admin", "index" }
/admin/item.jsp - { "admin-item", "admin", "index" }
5.2.2.4. Configuration
The choice of which stylesheet resolver to use is controlled by the waf.templating.stylesheet_resolver
property, and defaults to com.arsdigita.templating.PatternStylesheetResolver.
The location of the paths file to configure the pattern based stylesheet resolver is controlled by
the waf.templating.stylesheet_paths property, defaulting to /WEB-INF/resources/stylesheet-
paths.txt
To enable an application to operate with the default pattern stylesheet resolver configuration,
its primary top level stylesheet should be named /__ccm__/apps/[application
key]/xsl/index.xsl.