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

B

Bill Sneddon

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top