Subject: Re: [xsl] define a global variable and change it From: henry human <henry_human@xxxxxxxx> Date: Tue, 12 Aug 2008 18:04:05 +0200 (CEST) |
Hi guys, thanks for your answers. It is such szenario: User defines a html layout choosing certain html elements from the menu bar and clik 'ok'. The XSLT should look after a specific html element which is a inputfield and contains a string . the string could be either section1 or section2. So far the styleesheet sees the value of the inputfield (section1or section2) in a xsl:if test .. statement, it sets/changes the global variable. Other statements in the stylesheet look for the global variable and do according to them something and so on. --- Andrew Welch <andrew.j.welch@xxxxxxxxx> schrieb: > 2008/8/12 henry human <henry_human@xxxxxxxx>: > > Hi > > is it possible to define a global variable with > xsl? > > I am going to define such varable to be able > changing > > its value some where inside the stylesheet. > > Hier is asample which does not work!: > > ********************************** > > <html> > > <body> > > <xsl:variable name="x" select="'abcd'"/> > > <p> Value of x: <xsl:value-of select="$x"/> > </p> > > <xsl:variable name="x"> succeded</xsl:variable> > > <p> Value of x: <xsl:value-of select="$x"/> > </p> > > ************************ > > You can't change the value of a variable in XSLT - > they are more like > constants or Final variables. There's no need to > either - show us the > problem you are trying to solve, and we'll show you > how to do with > without needing to change the value of a variable. > > > -- > Andrew Welch > http://andrewjwelch.com > Kernow: http://kernowforsaxon.sf.net/ > > __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf|gt |ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] define a global variable , Scott Trenda | Thread | Re: [xsl] define a global variable , Andrew Welch |
Re: [xsl] define a global variable , Colin Paul Adams | Date | Re: [xsl] define a global variable , Andrew Welch |
Month |