XSLT stylesheets for Template Building Blocks
Create XSLT stylesheets to transform any XML in the input Package into any other XML, then paste your code into the Source tab of a new Template Building Block in Content Manager Explorer.
- XSLT stylesheet Content Manager parameters
From your XSLT stylesheet, you can access various Content Manager items by passing parameters to the XSLT stylesheet. This topic lists the parameters that you can pass as thenameattribute of anxsl:paramelement. - XSLT stylesheet custom parameters
You can pass a custom parameter to the XSLT stylesheet that you added to the input package. The value of the parameter in the package overrides any default value you may have set for it in the stylesheet itself. - Including content from another Template Building Block in your XSLT stylesheet
To include the contents of another Template Building Block into an XSLT stylesheet, include the line<xsl:import href="tcm:1-23-2048"/>in your stylesheet, wheretcm:1-23-2048is the Content Manager URI of the item you want to include. - Changing the input package item to transform
By default, the XSLT template transforms the item calledComponent(if the Template Building Block is part of a Component Template) orPage(if part of a Page Template). You can override this default, however. - Changing the name of the output package item
By default, the XSLT template puts its transformed output in an item calledOutputin the package. To override this default, start your template with<?XsltMediator outputItemName="MyItem"?>, where MyItem is the name of an item in the input package you want to write your output to. - Accessing methods from a class from a .NET assembly Template Building Block
If you have a Template Building Block that contains a .NET assembly, you can access certain of its class methods from your XSLT template by referring to the Template Building Block. - XSLT stylesheet built-in functions
By declaring a namespace, you can access several built-in functions from the XSLT stylesheet in your Template Building Block, made available by Content Manager. - Example XSLT stylesheet
The following example XSLT stylesheet show how your XSLT might interact with Content Manager.