Hi Steve and Gautam, you can try the following to see if your code works at all.... I did embed the scripting and CSS in the stylesheet, because I wanted a quick solution and hadn't any knowledge of how to use the sitemap.
<xsl:stylesheet xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <svg xmlns:svg="http://www.w3.org/2000/svg" width="1000" heigth="120"> <script language="JavaScript" type="text/javascript"> <![CDATA[ ////////////////////////////// // Declare Global Variables // ////////////////////////////// var SVGDoc = null // Make sure we're using the correct SVG object on the page // - there can be more than 1 sourced element // function getObj(mouseEvent) { SVGDoc = mouseEvent.getTarget().getOwnerDocument() } //////////////////////////////// // SVG Manipulation Functions // //////////////////////////////// // change the fill color of an element function elemColor(mouseEvent, elemName, value) { // get the proper SVG object getObj(mouseEvent) // check for AI converted spaces elemName = spaceTrans(elemName) // get the element we want to change var thisElem = SVGDoc.getElementById(elemName).getStyle() // perform the fill color change thisElem.setProperty('fill', value) } // change the stroke width of an element function elemStrokeWidth(mouseEvent, elemName, value) { // get the proper SVG object getObj(mouseEvent) // check for AI converted spaces elemName = spaceTrans(elemName) // get the element we want to change var thisElem = SVGDoc.getElementById(elemName).getStyle() // perform the stroke width change thisElem.setProperty('stroke-width', value) } // change the stroke color of an element function elemStrokeColor(mouseEvent, elemName, value) { // get the proper SVG object getObj(mouseEvent) // check for AI converted spaces elemName = spaceTrans(elemName) // get the element we want to change var thisElem = SVGDoc.getElementById(elemName).getStyle() // perform the stroke color change thisElem.setProperty('stroke', value) } // show an element - note: these work with the display property, not visibility function elemShow(mouseEvent, elemName) { // get the proper SVG object getObj(mouseEvent) // check for AI converted spaces elemName = spaceTrans(elemName) // get the element we want to change var thisElem = SVGDoc.getElementById(elemName).getStyle() // make the element visible thisElem.setProperty('display', 'inline') } // hide an element - note: these work with the display property, not visibility function elemHide(mouseEvent, elemName) { // get the proper SVG object getObj(mouseEvent) // check for AI converted spaces elemName = spaceTrans(elemName) // get the element we want to change var thisElem = SVGDoc.getElementById(elemName).getStyle() // hide the element thisElem.setProperty('display', 'none') } // translate spaces into equivalent AI exported space string function spaceTrans(stringIn) { var result = "" for (var i = 0; i < stringIn.length; i++) { if (stringIn.charAt(i) == " ") { result += "_x0020_" } else { result += stringIn.charAt(i) } } return result } ]]></script> <defs> <style type="text/css"><![CDATA[ path { fill: none; stroke: grey; stroke-opacity:0.8; stroke-width: 1; } line { fill:none; stroke:grey; stroke-opacity:0.8; stroke-width:1; } rect { fill:none; stroke:grey; stroke-opacity:0.8; stroke-width:1; } text { font-size:10; font-family:Verdana; text-anchor:right; fill:black; display:none; } ]]></style> </defs> <xsl:variable name="scalingfactor"><xsl:value-of select="//scaling"/></xsl:variable> <g transform="scale({$scalingfactor} {$scalingfactor})"> <g transform="translate(0,20)"> <xsl:apply-templates/> </g> </g> </svg> </xsl:template> </xsl:stylesheet> Kind regards, Robby Pelssers --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]