Subject: RE: [xsl] doctype declaration and msxmldom From: "Nancy Pate" <paten@xxxxxxxxxxx> Date: Thu, 19 Jun 2003 17:05:44 -0400 |
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 è has a UTC code of #x00E8 and a numeric entry reference (?) è 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: [xsl] 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 é è 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 é 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: [xsl] 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: [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"?> <!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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: FW: [xsl] doctype declaration a, Claudio Russo | Thread | Re: [xsl] doctype declaration and m, Mike Brown |
Re: FW: [xsl] doctype declaration a, Claudio Russo | Date | Re: [xsl] xsl:number problem, Wendell Piez |
Month |