i am new in XSLT domain,i have an html file that is rendering content of XML file through XSLT.Now after some dynamic change in XML CAN the XSLT behave according to that dynamic change is XML and the html page render that dynamic content or should there is need to reopen that html file in which that xml is referenced.
My XMl File is like
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="XSL.xsl"?>
<Arithmetic>
<Function>
<FunctionName>-</FunctionName>
</Function>
<Function>
<FunctionName>/</FunctionName>
</Function>
<Function>
<FunctionName>*</FunctionName>
</Function>
<Function>
<FunctionName>MOD</FunctionName>
</Function>
<Function>
<FunctionName>^</FunctionName>
</Function>
</Arithmetic>
And my XSLT file is
**<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/*">
<html>
<body>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
</tr>
<xsl:for-each select="/*/Function">
<tr>
<td><xsl:value-of select="FunctionName"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>**
My Sample html would be like
<html>
<head>
<SCRIPT LANGUAGE=javascript>
function createDom(stringXML){
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); // create a xmlDOM object
xmlDoc.async="false"
xmlDoc.loadXML(stringXML);
return xmlDoc;
}
function onOk()
{
xmlDom2 = createDom("<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="XSL.xsl"?><Geometric><Function><FunctionName>-</FunctionName></Function><Function><FunctionName>/</FunctionName></Function><Function><FunctionName>*</FunctionName></Function><Function><FunctionName>MOD</FunctionName></Function><Function><FunctionName>^</FunctionName></Function></Geometric>");
//now how could i give ref of that updated xml in the iframe or how the iframe will render this update xml
}
</SCRIPT >
</head>
<body >
<div id = "mainDiv" class = "scrollbar" style = "border:1px inset;height: 186px; overflow: auto;">
<IFRAME src = "XML.xml" id="IFRAME" style="visibility: visible;" ></IFRAME>
<INPUT id=btnOk onclick=onOk() type=button size=35 value=Change XML >
</div>
</body>
</html>
thanks