javascript如何调用xslt的变量
如
<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="xml" indent="yes"/> <xsl:template match="Component" name="Chart"> <xsl:param name="ID" select="'Test'"></xsl:param> <script > <![CDATA[ function loadXMLDoc(dname) { var txt = ""; if (window.XMLHttpRequest) { xhttp = new XMLHttpRequest(); } else { xhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.onreadystatechange = function () { if (xhttp.readyState == 4) { if (xhttp.status = 200) { txt = xhttp.responseXML; } } } xhttp.open("GET", dname, false); xhttp.send(""); //return xhttp.responseXML; return txt; } xml = loadXMLDoc("contraint1WithGridChartList.xml"); path = "//Component[@ID=$ID]//Parameter[@Type='XValue'] ]]> </script> </xsl:template></xsl:stylesheet>