Hi
I am new at using XML and XSL... and am breaking my head and the
keyboard because of a simple problem...
My XMl file is
<?xml version="1.0" standalone="yes"?>
<CardTransacts>
<CardTransactions>
<card_transaction_id>123</card_transaction_id>
<description_of_charge>abc</description_of_charge>
<process_date>2003-09-06T00:00:00.0000000+05:30</process_date>
<bill_amount>111</bill_amount>
<passenger_name>aa</passenger_name>
</CardTransactions>
...
...
</CardTransacts>
My xsl file is
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h3>Card Transformed</h3>
<table border="2">
<tr>
<td align="left">Card_Transaction_ID</td>
<td align="left">Passenger_Name</td>
<td align="left">Description_of_Charge</td>
<td align="left">Bill_Amount</td>
<td align="left">Process_Date</td>
</tr>
<xsl:for-each select="CardTransacts/CardTransactions">
<xsl:sort select="card_transaction_id" order="ascending"/>
<tr>
<td><xsl:value-of select="card_transaction_id"/></td>
<td><xsl:value-of select="passenger_name"/></td>
<td><xsl:value-of select="description_of_charge"/></td>
<td><xsl:value-of select="bill_amount"/></td>
<td><xsl:value-of select="process_date"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
My Javascript code is
objXMLDoc = new ActiveXObject("MSXML2.DomDocument.3.0");
objXMLDoc.async = false;
// This is necessary to use XPath in selectSingleNode and selectNodes methods
// For backwards compatibility, XSL Patterns are default.
objXMLDoc.setProperty("SelectionLanguage", "XPath");
objXMLDoc.resolveExternals = false;
objXMLDoc.validateOnParse = false;
objXMLDoc.load(strXMLFileName);
objXSLDoc = new ActiveXObject("MSXML2.FreeThreadedDomDocument.3.0");
objXSLDoc.async = false;
objXSLDoc.resolveExternals = false;
objXMLDoc.validateOnParse = false;
objXSLDoc.load(strXSLFileName);
objXSLTemplate = new ActiveXObject("MSXML2.XSLTemplate.3.0");
objXSLTemplate.stylesheet = objXSLDoc;
objXSLProcessor = objXSLTemplate.createProcessor(); objXSLProcessor.input = objXMLDoc;
objXSLProcessor.transform(); Results.innerHTML = objXSLProcessor.output;
However an error is being thrown at
objXSLTemplate.stylesheet = objXSLDoc;
When I used ASP.Net instead of javascript I got the error
'Member not found'
Could somebody throw some light on this?