Show TOC

 XSLT FilterLocate this document in the navigation structure

Definition

An XSLT filter takes an XML document as input, transforms it according to an XSL stylesheet specified for the filter in question, and renders it in the browser either directly, or after processing it with a formatter program specified for this filter.

 

Use

You use XSLT filters to publish XML documents in various presentation formats.

To be able to use an XSLT filter, you must provide the XSL stylesheet and the formatter program specified in the filter.

CM offers a number of predefined XSL stylesheets and formatter programs. The stylesheets are located in the filter directory of the /etc repository.

You can use these stylesheets and formatters to convert an XML document and display it in a different format. The table below lists the stylesheets and formatting programs that are provided by CM. Note that the individual stylesheets can only be used in connection with the specified formatter program.

XSL Stylesheets and Formatters for Various Display Formats

Output Format XSL Stylesheet Formatter

RSS News format

wcm://etc/filter/rss/rss-html.xsl

text/html

User Data

wcm://etc/filter/um/user-html.xsl

text/html

LDAP

wcm://etc/filter/ldap/propsxml-html.xsl

text/html

SVG (Scalable Vector Graphics Format)

wcm://etc/filter/svg/page-svg.xsl

For more information see: http://www.w3.org/Graphics/SVG/Overview.htm8

image/svg-xml

VRML (interactive 3D multimedia format for the Web)

wcm://etc/filter/vrml/hello-vrml.xsl

model/vrml

 

If you want to use the available formatter programs for the display formats XHTML, WML or PLAIN, you must write your own corresponding XSL stylesheets. The following lists the names of the formatter programs available for these formats. Note that in most cases the formatter has the same name as the MIME type of the output file.

Formatters for Various Display Formats

Output Format XSL Stylesheet Formatter

XHTML

To be provided by you

text/html

PLAIN (text format)

To be provided by you

text/plain

WML (Wireless Markup Language)

To be provided by you

text/wml

 

Activities

To create an XSLT filter or to change the configuration of an existing filter, choose Content Management → Repository Filters → XSLT Filter.

For a description of all filter parameters used, see Content Filters .

 

Example

Name         = umExtensions   = rdfFormatter    = text/htmlMIME Type    = text/htmlMIME Types   = text/rdfStylesheet   = wcm://etc/filter/um/user-html.xslRepositories = um

The example above shows the configuration for a content filter named um . The filter is applied to all resources in theum repository that have the file name extension rdf and the MIME type text/rdf . The stylesheet used for transforming the resource content has the URI wcm://etc/filter/um/user-html.xsl. The program used for rendering the transformed content as a document of MIME type text/html in the browser is the text/html formatter.