[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] <div id=$xslvar and document.getElementById($xslvar)
Hi, I am trying to make id=$var and later on get that id with CDATA - document.getElementById($var) so I can alter the position top left etc. but I have a definition problem. The relevant code: <msxsl:script implements-prefix="ext" language="javascript"> <![CDATA[ function xsltoscript(xsltname){ return xsltname; } ]]> </msxsl:script> <xsl:variable name="xslvar" select="//xmlelem"/> <div Id="$xslvar" style="position:absolute; top:{$yposition - 20}; left:{$xposition}"> <script language="JavaScript" > <![CDATA[ document.getElementById(]]><xsl:value-of select="ext:xsltoscript(string($xslvar))"/><![CDATA[).style.left=800; ]]> </script> The xml file: <xmlelem>sometext</xmlelem> While processing that I get :'sometext' is not defined While giving a variable that is not connected with an xml file like:<xsl:variable="xslvar" select=" 'anything ' "/> it goes with no problem. Do you have any idea whats wrong here? Udi XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|