Subject: Re: [xsl] how to get variable value outside scope From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Sun, 27 Feb 2005 02:31:44 -0800 (PST) |
Thank you David for your comments.. I have corrected both the mistakes you have pointed.. The updated article is posted again. Regards, Mukul --- David Carlisle <davidc@xxxxxxxxx> wrote: > > Mukul, > > There are a few technical issues, eg > > > The form [1] binds a variable name to a > simple(simplest!) RTF. This > > form is similar to declaration : <xsl:variable > name="varname" > > select="'mukul'" /> . The form [2] binds a > variable name to a tree > > fragment > > actually the form <xsl:variable > name="x">foo</xsl:variable> also binds a > result tree fragment, which is immportant it means > you normally > shouldn't do it as it's inefficient and has the > wrong behaviour when > coerced to boolean. > > But mainly I wanted to comment on the general > premise that > > > So the variable construct in XSLT behaves quite > differently than > > traditional variables. > > This is like describing chinese by saying that it > doesn't use the > traditional english alphabet. The behaviour may be > different from your > expectation but "tradition" depends on who you are, > and how long you've > been there. > > The use of variables to denote values rather than > memory locations has a > long tradition that is much older than digital > computers, and even in > the context of digital computer languages goes back > at least as far as > lisp in the early 1960's. Given that, it reads > rather strangely to see > such newfangled languages as Java, and even C, > described as > "traditional". When I was first shown computer > programmining (Fortran, > at school in the mid 70's) the use of "variables" in > that language and > the fact that X=X+1 actually meant something and > wasn't just a false > equation, was described by all the beginner guides > as a strange use of > "variable" but a necessary low level feature in > order to control a > machine which wasn't capable of the normal > mathematical reasoning. How > times change.... > > David __________________________________ Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball. http://baseball.fantasysports.yahoo.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to get variable value, David Carlisle | Thread | [xsl] Trying to write XSL for TiVo', Mihir |
Re: [xsl] how to get variable value, David Carlisle | Date | RE: [xsl] re: how to get variable v, Michael Kay |
Month |