[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to simplify this?

Subject: How to simplify this?
From: "anton" <a.m@xxxxxxxxxxx>
Date: Tue, 21 Sep 2004 18:13:27 +0200
xsl concat apos
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">&#x27;</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">&amp;nbsp;&amp;uarr;</xsl:text></span>
				</div>
				</a>
			</th>
		</xsl:for-each>
	</tr>
</xsl:template>

best regards 
A. Metz

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.