"Bill Sneddon" <bs******@yahoo.com> wrote in message news:bd**********@ngspool-d02.news.aol.com...
<%response.write "<tr><td><a href=""file://SERVER/mmlogs/TNAME" &
yearmonth & """>"& "MYJUNK" & "</a><BR></td></tr>" %>
In your XSLT stylesheet (Python-irrelevant) you'd have the following in an
xsl:template (whitespace/indentation added for readability), and you would
pass yearmonth (and any other Python variables) to the stylesheet as
parameters,
<![CDATA[<%response.write "]]>
<tr>
<td>
<a href="file://{$SERVER}/mmlogs/{$TNAME}{$YEARMONTH}" >
<xsl:value-of select="$MYJUNK" />
</a>
<br/>
</td>
</tr>
%>
Both parameters and variables can be referenced within your stylesheet's
templates with $PARAM_OR_VARIABLE_NAME. They can be injected
into quoted text (ie, attribute values) by enclosing the parameter or variable
reference in curly braces, as shown above.
I have spent a lot of time messing around with this to no good end.
A few pointers if you'll be modifying the stylesheet to accept global
parameters is that it requires <xsl:param name="YEARMONTH" />
(etc.) tags as the immediate children of the opening <xsl:stylesheet ...>
tag. Then your Python environment should offer a means for passing
arguments to the stylesheet before kicking off the Transform process.
Look for overloaded methods that take a list of arguments in the
documentation, and pass the Python variables you're using like
yearmonth to the stylesheet beforehand.
If yearmonth is a JSP or other after-the-fact variable identifier that you
don't have at transformation time, then what else you might try is to
set the xsl:output mode to text and do something literal with CDATA
sections in the stylesheet, like (newlines added for readability):
<!-- . . . -->
<xsl:text><a href='file://</xsl:text>
<xsl:value-of select="$SERVER"/>
<xsl:text>/mmlogs/</xsl:text>
<xsl:value-of select="$TNAME"/>
<xsl:text>" & yearmonth & "'"></xsl:text>
<!-- . . . -->
Notice I took advantage of HTML's allowance for either single-quote
or double-quotes, having runs of """ can be problematic.
HTH,
Derek Harmon