RE: [xsl] doctype declaration and msxmldom

Subject: RE: [xsl] doctype declaration and msxmldom
From: "Whitney, Dan (CanWest Interactive)" <DWhitney@xxxxxxxxxxx>
Date: Tue, 17 Jun 2003 12:48:57 -0400
I tried some error code (new at this so bear with me)

I changed the script to:


<script type="text/javascript">
    var myDocument = new ActiveXObject("Msxml2.DOMDocument.4.0");
    myDocument.async = false;
document.write("<br>Error Code: ")
document.write("<br>Error Reason: ")
document.write("<br>Error Line: ")
document.write("<br>Error Position: ")
<body onload = "init()" >
   <div id="resTree"></div>

When I open the file I get the following error:

Error Code: -1072898035
Error Reason: The element 'PUBLICATION' is used but not declared in the
Error Line: 10
Error Position: 14 

which is an error on the open PUBLICATION element.

If I change the declaration to just


I get the same error.

If I remove the doctype declaration altogether I get no error.

Also I have no problems running the transform with saxon.

Any help appreciated.


-----Original Message-----
From: Whitney, Dan (CanWest Interactive) [mailto:DWhitney@xxxxxxxxxxx]
Sent: June 12, 2003 10:25 AM
To: 'mulberry - xsl'
Subject: [xsl] doctype declaration and msxmldom

Looked in the archives but to no avail.

Having a little trouble with the doctype declaration and an xslt.

I have the following in my source xml document:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="fpir_web_wrapper_1.xsl"?>
[<!ENTITY % isolat SYSTEM "xml_isolat1.ent" >
<!ENTITY % isopub SYSTEM "xml_iso-pub.ent" >
<!ENTITY % isonum SYSTEM "xml_iso-num.ent" >

When I open the xml document in ie6 everything works fine.
However when I run the following javascript snippet:

  <script language = "javascript">
     function init()
        var srcTree = new ActiveXObject("Msxml2.DOMDocument.4.0");

        var xsltTree= new ActiveXObject("Msxml2.DOMDOCUMENT.4.0");
        xsltTree.async = false;

        resTree.innerHTML = srcTree.transformNode(xsltTree);

<body onload = "init()" >
   <div id="resTree"></div>

I get nothing showing up in the browser. If I comment out the doctype
declaration the instance opens with no problems.

What am I missing?

Thanks in advance,


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread