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

Re: [XSL-FO] xslt- variable usage

Expand Messages
  • G. Ken Holman
    ... All XPath addresses must be fully composed ... they can begin with a variable of type node set , but that doesn t appear to be what you are trying to do.
    Message 1 of 2 , Sep 24, 2004
    • 0 Attachment
      At 2004-09-24 07:48 +0000, gb81jp wrote:
      >I used variable record and variable name. Then, I wrote like that.
      ><xsl:value-of select="$record/$name"/>
      >I want $record and $name to be replaced by their values.
      >But it didn't work.

      All XPath addresses must be fully composed ... they can begin with a
      variable of type "node set", but that doesn't appear to be what you are
      trying to do. You cannot "compose" an XPath address from strings and then
      evaluate the string as an XPath address.

      I find that programmers in my XSL classes attempt to do some kind of "eval"
      function on strings, but this is not possible. In most cases there is an
      XSLT way of looking at things instead of a programming way of looking at
      things that will give you what you want.

      I hope this helps.

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


      --
      Upcoming publicly-subscribed XSL delivery: Helsinki Oct 18-20,2004
      World-wide on-site corporate, govt. & user group XML/XSL 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
      Legal business disclaimers: http://www.CraneSoftwrights.com/legal
    Your message has been successfully submitted and would be delivered to recipients shortly.