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

Re: [XSL-FO] Re: Hyperlink Queries in a Dynamic Table

Expand Messages
  • G. Ken Holman
    XSLT and XPath questions would be better posted to the following list: http://www.mulberrytech.com/xsl/xsl-list There are a number of subscribers who would
    Message 1 of 3 , May 28, 2003
    • 0 Attachment
      XSLT and XPath questions would be better posted to the following list:

      http://www.mulberrytech.com/xsl/xsl-list

      There are a number of subscribers who would enthusiastically respond to
      such questions.

      There is also an *excellent* FAQ at:

      http://www.dpawson.co.uk

      At 2003-05-28 15:45 +0000, raithnwno wrote:
      >Here's a better explanation of my question:
      >
      >I'm using a FOR-EACH like:
      >
      >----
      ><xsl:for-each select="ROOT/Level1/Level2">

      So is "Level2" your row?

      >I want to hyperlink one of the columns to use an http:// sql
      >query
      >
      >-----
      ><a href="http://munsql01/DCR?
      >SQL=SELECT+*+FROM+DailyView+where+prodDate+=+'5/23/2003'+for+xml+auto,
      >elements&xsl=Prodview.xsl&root=ROOT">
      ><xsl:value-of select="ProdID">
      ></a>
      >------
      >
      >but need to add a variable in the query that uses the current row's
      >ProdID.
      >Basically somehow add 'and ProdID=<xsl:value-of select="ProdID">'
      >Into that query.

      Use an attribute value template:

      href="......and {ProdID}..."

      An attribute value template is the equivalent to <xsl:value-of/> but is
      usable inside of a literal result element's attribute where an element
      instruction would not be allowed.

      >1. How do I have more control over the value-of in a for-each per
      >row?

      "Over value-of"?? Not sure what you are asking.

      At all points inside of:

      <xsl:for-each select="/address/to/node">

      <!--the current node "." is each node in turn of those
      selected by the address-->

      </xsl:for-each>

      >When I attempt to test using a variable it always pulls the
      >first row's value and not the row that it is currently in.

      You don't say what expression you are using for your test. If you base
      your test on the current node by either using "." or not beginning the
      expression with "/", you will be relative to the node being processed at
      the point of time in the iteration.

      I hope this helps.

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

      --
      Upcoming hands-on courses: (registration still open!)
      - (XSLT/XPath and/or XSL-FO) North America: June 16-20, 2003

      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)
      ISBN 0-13-065196-6 Definitive XSLT and XPath
      ISBN 0-13-140374-5 Definitive XSL-FO
      ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
      ISBN 1-894049-11-X Practical Formatting Using XSL-FO
      Member of the XML Guild of Practitioners: http://XMLGuild.info
      Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
    Your message has been successfully submitted and would be delivered to recipients shortly.