[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: doctype declaration and msxmldom

Subject: RE: doctype declaration and msxmldom
From: "Nancy Pate" <paten@xxxxxxxxxxx>
Date: Thu, 19 Jun 2003 17:05:44 -0400
msxml2.domdocument.4.0 encoding
I work with SGML.  When you declare "DOCTYPE" the composing/processing
engine is going to expect a DTD.  Can you declare the necessary encoding
in the XML declaration (<?xml version="1.0" encoding="ISO-8858-1"?>) and
then use the Unicode number?  I have a table that says that &egrave; has
a UTC code of #x00E8 and a numeric entry reference (?) &#232;  Maybe you
could research this and see if it fits what you need.  I don't know
anything about DOM so I don't know if this will help.

Nancy

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Whitney, Dan
(CanWest Interactive)
Sent: Thursday, June 19, 2003 4:48 PM
To: 'mulberry - xsl'
Subject: FW:  doctype declaration and msxmldom


OK not a lot of responses. But here goes:

All I want to do is include some external character entity files
(isopub, isonum etc) because in my xml instance I have &eacute; &egrave;
etc. The only way I know how to do this is in the doctype declaration
(assuming no
dtd) as follows:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="fpir_web_wrapper_1.xsl"?>
<!DOCTYPE PUBLICATION [<!ENTITY % isolat SYSTEM "..\..\character
entities\isolat1.ent" > <!ENTITY % isopub SYSTEM "..\..\character
entities\iso-pub.ent" > <!ENTITY % isonum SYSTEM "..\..\character
entities\iso-num.ent" > %isolat; %isopub; %isonum; ]> <PUBLICATION> ...
</PUBLICATION>

IE6 opens file, no problems; saxon translates file, no problems, but the
msxmldom insists that if I have a doctype declaration I have to include
a dtd or a schema -- "The element PUBLICATION is used but not declared
in the dtd/schema"

Is that declaration correct?

Is there some other way of incorporating those character entity files so
that &eacute; becomes é? Has no one else had any problems with this?

Thanks,

Dan


-----Original Message-----
From: Whitney, Dan (CanWest Interactive) 
Sent: June 17, 2003 12:49 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  doctype declaration and msxmldom


I tried some error code (new at this so bear with me)

I changed the script to:

<html>

<script type="text/javascript">
    var myDocument = new ActiveXObject("Msxml2.DOMDocument.4.0");
    myDocument.async = false;
    myDocument.load("fpir_3776_1.xml");
document.write("<br>Error Code: ")
document.write(myDocument.parseError.errorCode)
document.write("<br>Error Reason: ")
document.write(myDocument.parseError.reason)
document.write("<br>Error Line: ")
document.write(myDocument.parseError.line)
document.write("<br>Error Position: ")
document.write(myDocument.parseError.linepos)
</script>
</head>
<!--
<body onload = "init()" >
   <div id="resTree"></div>
</body>
-->
</html>

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
DTD/Schema. 
Error Line: 10
Error Position: 14 

which is an error on the open PUBLICATION element.

If I change the declaration to just

<!DOCTYPE PUBLICATION>
<PUBLICATION>
...
</PUBLICATION>

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.

Dan

-----Original Message-----
From: Whitney, Dan (CanWest Interactive) [mailto:DWhitney@xxxxxxxxxxx]
Sent: June 12, 2003 10:25 AM
To: 'mulberry - xsl'
Subject:  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"?>
<!DOCTYPE PUBLICATION [<!ENTITY % isolat SYSTEM "xml_isolat1.ent" >
<!ENTITY % isopub SYSTEM "xml_iso-pub.ent" > <!ENTITY % isonum SYSTEM
"xml_iso-num.ent" > %isolat; %isopub; %isonum;]> <PUBLICATION> ...
</PUBLICATION>

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

<html>
  <script language = "javascript">
     function init()
     {
        var srcTree = new ActiveXObject("Msxml2.DOMDocument.4.0");
        srcTree.async=false;
        srcTree.load("3776_web.xml");



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

        resTree.innerHTML = srcTree.transformNode(xsltTree);
     }
  </script>
</head>

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

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,

Dan
 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.