Subject: [xsl] How to simplify this? From: "anton" <a.m@xxxxxxxxxxx> Date: Tue, 21 Sep 2004 18:13:27 +0200 |
Hi! In the HTML-output I need a javascript function with ' mark. My template get two parameters, which I wish in single-quoted mark. So I define additional three variables for this. Is there a better way to do this? I use MSXML 4.0 and XSL 1.0 My xsl-template: <xsl:template match="QTableBox/ROW[*[1][@Type='Label']]" > <xsl:param name="tbody_id" /> <xsl:param name="thead_id" /> <xsl:variable name="apos">'</xsl:variable> <xsl:variable name="qbody_id" select="concat( $apos, $tbody_id, $apos )" /> <xsl:variable name="qhead_id" select="concat( $apos, $thead_id, $apos )" /> <tr class="tableHead"> <xsl:for-each select="*"> <xsl:variable name="colPos" select="position()-1"/> <th nowrap="nowrap"> <a href="" onclick="setArrow( {$colPos}, {$qhead_id} ); return sortTable( {$qbody_id}, {$colPos} );"> <div style="{ $ownStyle }"> <xsl:copy-of select="node()" /> <span style="visibility:hidden;"><xsl:text disable-output-escaping="yes">&nbsp;&uarr;</xsl:text></span> </div> </a> </th> </xsl:for-each> </tr> </xsl:template> best regards A. Metz
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] a Real Quickie, David Carlisle | Thread | Re: [xsl] How to simplify this?, David Carlisle |
Re: [xsl] Namespace problems, Bruce D'Arcus | Date | RE: [xsl] Namespace problems, Andrew Welch |
Month |