Re: FW: [xsl] doctype declaration and msxmldom

Subject: Re: FW: [xsl] doctype declaration and msxmldom
From: Claudio Russo <claudio_russo@xxxxxxxxx>
Date: Thu, 19 Jun 2003 14:03:39 -0700 (PDT)
Dan,

I don't know if this helps, but if I want to support
spanish accents in my application, I just include the
next at the beggining of my XML file:

<?xml version='1.0' encoding='windows-1252'
standalone='yes'?>

This "encoding" supports the accents inside the XML
data file. 


--- "Whitney, Dan (CanWest Interactive)"
<DWhitney@xxxxxxxxxxx> wrote:
> 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: [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
> 


=====
Regards, Claudio.

IT Consultant.
Buenos Aires, Argentina.
e-mail: claudio_russo@xxxxxxxxx


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Current Thread