XsltApplication Content Type
The XsltApplication is an Application that renders the requested Content's (context Content) xml using a specified XSLT transformation. The output is cached by default.
This type of application renders a custom response output for the requested Content: the XML representation of the Content is processed using anXSLT transformation that is given as a string property of the Application (Xslt template).
The output of the XsltApplication can be cached - and cache is switched on by default.
It is strongly advised to use the cache functionality of XsltApplication on live sites. XsltApplications that are not being cached may cause pages to be less responsive even at small visitor rates.
This functionality is controlled by the following properties:
- Application is cached (Cacheable)
- Application is cached for logged in users (CacheableForLoggedInUser)
- Request path influences caching (CacheByPath)
- Url query params influence caching (CacheByParams)
- Language influences caching (CacheByLanguage)
- Absolute expiration (AbsoluteExpiration)
- Sliding expiration (SlidingExpirationMinutes)
- Custom cache key (CustomCacheKey)
See detailed description below (#Fields). By default requested Content path is used as cache key. Besides this, output cache works the exact same way as portlet cache for Cacheable Portlets. See detailed info at Cacheable Portlet#Parameters and Cacheable Portlet#Sliding and Absolute expiration. Please note, that the url parameter ?disablecache=true can be used for debugging to temporarily switch off caching (see Cacheable Portlet#Debugging).
- Usage: /mycontent?action=Xml (ie.: http://localhost/NewsDemo?action=Xml )
- This application uses a simple copy xslt to generate the content xml as an xml output. After request viewing the page source will give us the Content xml. Useful for debugging and when creating custom XSLT for views.
The content handler of the XsltApplication Content Type handles the following:
- it implements IHttpHandler interface to render custom output using the given XSLT transformation
- it caches the rendered output using the given cache parameters
There are no examples for this article.
There are no external references for this article.