Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
When Params are defined in templates. A default value can be give to each of them. If the template is called without value to a param, that default value is used. If param is defined without value, the default value is "". Varaibles have to be given specific values. I think Skonnard book chapter 5 talks about it relatively well.
Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
That means xsl aram value can be changed when template is called, but xsl:variable vlaue cannot be changed since it is static variable. Please correct me if I'm wrong. thank you RL
I wouldn't think of that way, even though it appears to be that. I think neither param or variable can be changed in value for a given scope, although they can be redefined. To me, changing a value of param or variable means something like this: <xsl:variable name="vName" select="oldValue"/> <!-- the following doesn't exist at ALL --> <xsl:change-variable name="vName" select="newValue"/> <!-- the above doesn't exist at ALL --> When you redefine vName in another scope to override the previous one, say, I think it is a new variable. Params are probably the same after all. Templates can have two params in hand when get called, one is the default, when is what get passed. If the passed is not there, then the default is used. Other opinions?
Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
I haven't found any material that helps to me understand the scoope of variables. I have the Skonnard, but am looking for other examples, does anyone know where to look for this.
The difference is that the value specified on the xsl:param variable is only a default value for the binding; when the template or stylesheet within which the xsl:param element occurs is invoked, parameters may be passed that are used in place of the default values.
Cheers, Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.