resovling variable a tranform and run time .... Is this impossibleor not worth doing?

Discussion in 'XML' started by Bill Sneddon, Jun 24, 2003.

  1. Bill Sneddon

    Bill Sneddon Guest

    The XSL code below generates the correct output for my html file.
    I would like to run the transform once and have the the $yearM variable
    be updated in the HTML.

    I have played around with it and made a mess of it.
    I can write a script to produce the date string for $yearM
    but can not get it to integrate with with the HTML tag below.

    <xsl:variable name="yearM">200306</xsl:variable>
    <xsl:variable name="server" select="MM_NAME" />
    <xsl:variable name="filen" select="TOOL_NAME" />

    <a hef="http://{$server}/mmlogs/{$filen}{$yearM}"><xsl:value-of
    select="TOOL_NAME"/></a>

    above resolves to this:
    <a href="http://usambara/mmlogs/ASHZ01ED200306">ASHZ01ED</a>

    This script works in HTML.

    <script type="text/vbscript">
    if month(date) < 10 then
    yearmonth= year(date)& "0" & month(date)
    else
    yearmonth= year(date) & month(date)
    end if

    </script>
    Bill Sneddon, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cengiz

    Tranform XML with XSL

    Cengiz, Oct 17, 2003, in forum: XML
    Replies:
    0
    Views:
    423
    Cengiz
    Oct 17, 2003
  2. Abhinav
    Replies:
    2
    Views:
    421
    Abhinav
    Jun 25, 2004
  3. Luke Dalessandro
    Replies:
    4
    Views:
    917
    Luke Dalessandro
    Sep 24, 2004
  4. su
    Replies:
    2
    Views:
    1,785
  5. Pierre Yves
    Replies:
    2
    Views:
    482
    Pierre Yves
    Jan 10, 2008
Loading...

Share This Page