|
Home > Online Product Documentation > Table of Contents > xsl:with-param xsl:with-paramPasses a parameter value to a template. Format
Description
The
The
The value that you pass to a template can be an object of any of the types that are returned by expressions. You can specify the value of the parameter in several ways:
The
You can specify the
ExampleSuppose you specify the following parameter for a template:
You can pass another value for this variable as follows:
Standard XML declaration.
xsl:stylesheet is an XSLT instruction. It must be the root element in a stylesheet to be used with Stylus Studio.
xsl:template is an XSLT instruction. It contains literal data to be copied to the result document and XSLT instructions to be followed by the XSLT processor. The processor performs these steps for the source nodes identified by the match attribute value. In this template, the match attribute identifies the root node of the source document.
Namespace declaration for W3C XSLT namespace.
xsl:output is an XSLT instruction. In this stylesheet, it specifies that the result document will be in HTML format.
xsl:apply-templates is an XSLT instruction. For each node identified by this instruction's select attribute, the XSLT processor goes to another template in this stylesheet, and performs the actions defined in that template. When done, the processor returns here, and moves to the next line in this template. In this template, the select attribute identifies all book elements in the source document.
xsl:sort is an XSLT instruction. The XSLT processor processes the book nodes in alphabetical order by author.
This template matches book elements in the source document. That is, the template's match attribute identifies book elements. In this stylesheet, the XSLT processor performs the actions in this template three times, once for each book element in the source document.
xsl:value-of is an XSLT instruction. The XSLT processor extracts the contents of the source node specified in the select attribute and copies it into the result document.
|

Cart

