Loading ...
Sorry, an error occurred while loading the content.
 

Changing value of an xsl:variable

Expand Messages
  • laermans_k
    Hi, Can anyone tell me how it s possible to change the value of an xsl:variable using numbers? ex.
    Message 1 of 4 , Feb 4, 2004
      Hi,
      Can anyone tell me how it's possible to change the value of an
      xsl:variable using numbers?

      ex.
      <xsl:variable name="test">
      <xsl:value-of select="1" />
      </xsl:variable>

      What do i have to do to add a number (fe. 1) to this value?

      Thanks in advanced.

      Kind regards,

      K.
    • Chris Bowditch
      ... the xsl:variable tag is poorly named, because it is really a constant. Once defined its value cannot be modified. There are usually alternatives to achieve
      Message 2 of 4 , Feb 4, 2004
        laermans_k wrote:

        > Hi,
        > Can anyone tell me how it's possible to change the value of an
        > xsl:variable using numbers?

        the xsl:variable tag is poorly named, because it is really a constant.
        Once defined its value cannot be modified. There are usually
        alternatives to achieve what you need. If you describe what you are
        trying to do then we will try to help.

        Chris
      • G. Ken Holman
        ... Careful Chris ... :{)} When I dared to say this years ago (I ve just tried to find it in the archives and I cannot, I would have loved to find the quote
        Message 3 of 4 , Feb 4, 2004
          At 2004-02-04 11:16 +0000, Chris Bowditch wrote:
          >the xsl:variable tag is poorly named, because it is really a constant.

          Careful Chris ... :{)}

          When I dared to say this years ago (I've just tried to find it in the
          archives and I cannot, I would have loved to find the quote again) I was
          jumped on very publicly on the XSL list that when you consider the role of
          a variable in mathematics as being a placeholder for a value, then it is
          most appropriately named and who could ever think that there may be a
          better name for it?

          I laughed at the comment because of how what I said off-hand could touch
          such a sensitive nerve.

          Just warning you in case you should get jumped on yourself ....

          ................... Ken


          --
          Public courses: sign up for one or both soon to reserve your seat!
          Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
          Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22
          Hong Kong, China: 2004-05-17 Bremen, Germany: 2004-05-24
          World-wide on-site corporate, government & user group XML training

          G. Ken Holman mailto:gkholman@...
          Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
          Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
          Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
        • Chris Bowditch
          ... Thanks Ken. I suppose in a strict mathematics sense the name is valid. But we are working in a computing environment, and xsl:variable is not a variable in
          Message 4 of 4 , Feb 5, 2004
            G. Ken Holman wrote:
            > At 2004-02-04 11:16 +0000, Chris Bowditch wrote:
            > >the xsl:variable tag is poorly named, because it is really a constant.
            >
            > Careful Chris ... :{)}
            >
            > When I dared to say this years ago (I've just tried to find it in the
            > archives and I cannot, I would have loved to find the quote again) I was
            > jumped on very publicly on the XSL list that when you consider the role of
            > a variable in mathematics as being a placeholder for a value, then it is
            > most appropriately named and who could ever think that there may be a
            > better name for it?
            >
            > I laughed at the comment because of how what I said off-hand could touch
            > such a sensitive nerve.
            >
            > Just warning you in case you should get jumped on yourself ....

            Thanks Ken. I suppose in a strict mathematics sense the name is valid.
            But we are working in a computing environment, and xsl:variable is not a
            variable in the programming sense. I think this name trips people up
            because a lot of people in computing have a programming background.

            Chris
          Your message has been successfully submitted and would be delivered to recipients shortly.