Function transport () {
// Associate The Result Tree Object with any element (s) whose
// id attribute is "TransformedXML."
Var objrestree = Document.all ['TransformedXML'];
// Declare TWO New MSXML Domdocument Objects.
Var objsrctree = new activXObject ('msxml2.domdocument.4.0');
Var objxslt = new activXObject ('msxml2.domDocument.4.0');
Objxslt.validateonparse = true;
// load the two domdocuments with the xml document and the
// xslt style sheet.
Objsrctree.Load ('Hello.xml');
Objxslt.Load ('Hello.xslt');
IF (objxslt.parseerror.errorcode! = 0)
{
Var strerrmsg = "Problem Parsing style Sheet:
"
"Error #:" Objxslt.Parseerror.errorcode "
"
"Description:" Objxslt.parseerror.reason "
"
"In file:" objxslt.parseerror.URL "
"
"Line #:" objxslt.parseerror.Line "
"
"Character # in line:" Objxslt.parseerror.LinePOS "
"
"Character # in file:" Objxslt.parseerror.Filepos "
"
"Source Line:" Objxslt.Parseerror.SrcText;
Objrestree.innerhtml = strerrmsg;
Return False;
}
// use the transformnode method to apply the xslt to the xml.
Strresult = objsrctree.transformNode (objxslt);
// Assign the resulting string to the result tree object?
// Innerhtml property.objrestree.innerhtml = Strresult;
Return True;
}
->
Script>
Body>
Html>