Combining Style Sheets

   

Parameters and Variables

Style sheets and templates can use parameters and variables . Both are names bound to a value. The difference is that a parameter only binds a default value, which can be overridden by the caller:

 <xsl:variable name="amount" select="/Invoice/Total"/>    <xsl:param name="label">Date: </xsl:param> 

The value of the variable or parameter is accessible in XPath by prefixing the name with a dollar sign ( $ ):

 $date/Currency    $label 
   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net