XML XSLT Variables & parameters Feb 20, 2006
Variables ● More like an algebraic variable than a programming variable ● Think of it as similar to a constant in a programming language ● Use when you have a value that is used multiple times in a stylesheet and it is conceivable that you might want to change all values
<!--This example illustrates the use of variables and formats Written by Richard Watson - - Feb > red Tour Guide Cities City: Population: Country:
Parameters ● A parameters is like a variable ● Treated as a default value ● Can be overridden at run time ● Change one line – blue ● NetBeans does not support passing of parameters to the transformation engine
Exercise ● Modify one of your existing stylesheets to use a variable