|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: R: IQuestion about XSLT and Math Operations
At 2005-12-05 13:09 +0100, drkm wrote:
"G. Ken Holman" wrote: > At 2005-12-05 00:23 +0100, Villani Alessandro wrote: Some of my students come to class confused about this. Constructs defined by <xsl:param> and <xsl:variable> are used in *precisely* the same way once a value is bound. The sole difference between the two is how the value is bound: for a variable the value can only be the value declared, while for a parameter the value is the declared value only if it is not overridden when the template invoked with a <xsl:with-param>. Otherwise they are treated as exactly the same kind of thing. In the author's example, the parameter is declared as a parameter of an unnamed template rule, thus the *only* way that a value other than the default value is bound to the parameter is through <xsl:with-param> as a child of <xsl:apply-templates>. Given that all of the information used is provided for in the source tree, I doubt that the template rule match was necessarily parameterized ... without more of the example code showing his use of <xsl:apply-templates> I made the assumption (and it was an assumption) that the author was using <xsl:param> unnecessarily and that <xsl:variable> was just as suitable. Because as I said, except for how the value is bound, they are indeed the same thing when being used. There are no differences in reference and use. I hope this is considered helpful. . . . . . . . . . Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








