Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL-T in IE (JScript) >Thread Next - Re: XSL-T in IE (JScript) Re: XSL-T in IE (JScript)To: NULL Date: 6/3/2005 11:15:00 AM
I've tried this, but it doesn't work:
<html>
<head>
<XML Id="testxml">
<Document>
<Data><Section Id="1">
<TestElem>Test</TestElem>
</Section>
</Data>
<Transformation><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head />
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="Document">
<xsl:for-each select="Data">
<xsl:for-each select="Section">
<xsl:apply-templates />
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</Transformation>
</Document>
</XML>
</head>
<body><DIV ID="divResults"/></body>
<script language="JavaScript">
var xmlDOM, xslDOM, t;
xmlDOM = testxml.XMLDocument;
if (xmlDOM == null) alert("xmlDOM == null");
var t = xmlDOM.selectSingleNode("//Transformation");
if (t == null) alert("t == null");
var s = t.text;
alert("XSLT: " + s); //s == empty string here :(
xslDOM = new ActiveXObject("MSXML.DOMDocument");
xslDOM.load(s);
divResults.innerHTML = xmlDOM.transformNode(xslDOM);
</script>
</html>
Why s is empty string? :(
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
