RE: [xsl][can we have more like this ??? xml/xsl/javascript] xmlDoc.documentElement Error

Subject: RE: [xsl][can we have more like this ??? xml/xsl/javascript] xmlDoc.documentElement Error
From: "Alan Flaherty" <alan@xxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Mar 2003 18:59:44 -0000
Hi there,

I'm quite interested in this :), have been working on Xml/Xsl/Javascript
tree's, Tool bars, menu's, webservices etc for the last couple of
months. 

* As a quick side note have you found any GOOD list's for this type of
thing?? I've been searching for the last couple of months and any that
are out the are dead :( There used to be an excellent Jscript list on
aspLists.com but that's gone now :( 

David, why have you prevented the document from being validated when its
being loaded??

xmlDoc.validateOnParse = false;

Make sure this is set to "true" and add the line (mentioned by Oleg
Tkachenko in a previous post, watch camel casing though):

if (xmlDoc.parseError.errorCode == null)
{
	// do everything
}
else
{
	var Err = xmlDoc.parseError;
	alert('ErrorCode:\t'+ Err.errorCode+'\r\nReason:\t'+
Err.reason);
	// Do error handling
}

This will alert you to any errors in the structure of the document,
which is the only likely reason that the document is not being loaded,
other than an invalid path.

I have lots of questions on this subject but f* all answers :), I'm
going to ask if the list would mind going slightly off topic for a
while, this is one of the closest lists to the subject and it would be
of immense help to me (and several others I'm sure) if some
knowledgeable person/people could answer a bunch of Xml/ Xsl/
Javascript/ Webservices questions (the list does seem to have a fair
knowledge of this), mainly regarding memory management and transforming
Xml Xsl using javascript within internet explorer.

Types Of questions:
	1/ Retrieving Xsl:message's after a javscript transformation
	2/ Webservice.htc : memory problems once page has been active
for a while 

I am currently working on two projects using this same methodology, one
is an insurance system another is a shopping cart.

I have split the user interface into several separate javascript
components that each interact with one "Datasource" my DataBroker, then
I have a sax type system (on the client) which parses the response from
the server and doles each "ResponsePacket" out to the relevant end point
in the system these are:

*Tree				: Application tree 
*Toolbar			: ToolButtons, paging; new element;
PropertyPageManager	: Lovely little beast, holds a dataset for each
page open and its PageDefinition, pages are removed from the app using
.removeNode(true) when page has been processed, data sets on a stack are
set to null
*MenuManager		: Context menus, popup menus & application[Top]
menu's
Datagrid			: Listing of elements, context menu &
toolbar allow operations to be performed

* Initial state Loaded on login

Could a moderator please advise about posting on this type of subject,
keeping in mind that there is very little opportunity to discuss this on
other lists.

Regards,

Alan


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Joe Fawcett
Sent: 25 March 2003 13:22
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] xmlDoc.documentElement Error

Also whether or not you have installed XML 4 is irrelevant. you are
using 
"Microsoft.XMLDOM" which will give you version 3 at best. You should use

"Msxml2.DomDocument.4.0" to be certain.

Joe


>From: "David Rigby" <D.A.Rigby@xxxxxxxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: Re: [xsl] xmlDoc.documentElement Error
>Date: Tue, 25 Mar 2003 13:06:00 -0000
>
>Stupid question perhaps, but are you sure your source document is
valid?
>The only two typical reasons for MSXML giving you a null document
element
>are either because the file doesn't exist (or is unreachable on the 
>server),
>or an error occurs during parsing.  Unless of course you're  loading a
>massive document on a severely memory-limited client...I guess that
might
>cause it too.
>
>David
>
>PS I'm sure someone will mention that this isn't an XSLT question
though :)
>
>----- Original Message -----
>From: "Neumyer, Jim" <jim.neumyer@xxxxxxx>
>To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
>Sent: Tuesday, March 25, 2003 12:51 PM
>Subject: [xsl] xmlDoc.documentElement Error
>
>
> > Hello,
> >
> > I am getting an error with XML/XSL.  It is saying that
> > 'xmlDoc.documentElement' is null or not an object. Line 47, char 7.
> > This is reported in IE 6.
> >
> > I have installed the XML SDK from Microsoft (Version 4.0).
> >
> > This is being run from an Apache web server on UNIX.  The /x12
directory
> > exists under the Apache directory and all of the files that it is
trying
>to
> > access exist with data.
> >
> > Here is the code where it comes from:
> > <HTML>
> > <HEAD>
> >   <title>Index Tree</title>
> >   <!-- left-hand frame for x12 displays -->
> >   <LINK REL="stylesheet" type="text/css" href="/x12/common.css"/>
> >   <SCRIPT LANGUAGE="Javascript">
> >     var xmlDoc;
> >     var iconb;
> >     var iconbO;
> >     var iconrb;
> >     var iconrbO;
> >     var iconp;
> >     var iconrp;
> >
> >     function initAdmin() {
> >       var xslDoc;
> >
> >       iconb = new Image();
> >       iconb.src = "/icons/b.gif";
> >       iconbO = new Image();
> >       iconbO.src = "/icons/bO.gif";
> >       iconrb = new Image();
> >       iconrb.src = "/icons/rb.gif";
> >       iconrbO = new Image();
> >       iconrbO.src = "/icons/rbO.gif";
> >       iconp = new Image();
> >       iconp.src = "/icons/p.gif";
> >       iconrp = new Image();
> >       iconrp.src = "/icons/rp.gif";
> >
> >       xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
> >       xmlDoc.validateOnParse = false;
> >       xmlDoc.resolveExternals = false;
> >       xmlDoc.preserveWhiteSpace = false;
> >       xmlDoc.async = false;
> >
> >       xslDoc = new ActiveXObject('Microsoft.XMLDOM');
> >
> >       xslDoc.validateOnParse = false;
> >       xslDoc.resolveExternals = false;
> >       xslDoc.preserveWhiteSpace = false;
> >       xslDoc.async = false;
> >
> >       xmlDoc.load("/x12/_data/xmlo.myipaddr");
> >       xslDoc.load("/x12/tree.xslt");
> >
> >       folderTree.innerHTML = 
>xmlDoc.documentElement.transformNode(xslDoc);
> >       collapse(folderTree);
> >     }
> >   </SCRIPT>
> >   <SCRIPT LANGUAGE="Javascript" SRC="/x12/admin.js"></SCRIPT>
> > </HEAD>
> > <BODY ONLOAD="initAdmin()" ONSELECTSTART="return false"
TOPMARGIN="0"
> > LEFTMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0">
> >   <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%"
> > WIDTH="100%" NOWRAP="true" STYLE="border-right: 1px solid black;"
> > VALIGN="TOP">
> >     <TR>
> >       <TD STYLE="background-color: #5389bc">
> >         <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1"
width="100%">
> >           <TR>
> >             <TD><center><DIV id="B1" CLASS="bOut"
> > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this,
>'bOut')"
> > ONCLICK="searchMenu()">Search</DIV></center></TD>
> >             <TD><center><DIV id="B2" CLASS="bOut"
> > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this,
>'bOut')"
> > ONCLICK="expandErrors(folderTree)">Errors</DIV></center></TD>
> >             <TD><center><DIV id="B3" CLASS="bOut"
> > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this,
>'bOut')"
> > ONCLICK="expandClaims(folderTree)">Claims</DIV></center></TD>
> >             <TD><center><DIV id="B4" CLASS="bOut"
> > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this,
>'bOut')"
> > ONCLICK="expandAll(folderTree)">ExpandAll</DIV></center></TD>
> >             <TD><center><DIV id="B5" CLASS="bOut"
> > ONMOUSEOVER="swapClass(this, 'bOver')" ONMOUSEOUT="swapClass(this,
>'bOut')"
> > ONCLICK="collapse(folderTree)">Minimize</DIV></center></TD>
> >           </TR>
> >         </TABLE>
> >       </TD>
> >     </TR>
> >     <TR>
> >       <TD HEIGHT="100%">
> >         <DIV ID="folderTree" STYLE="padding-top: 8px;width:
100%;height:
> > 100%;overflow: auto;"></DIV>
> >       </TD>
> >     </TR>
> >   </TABLE>
> > </BODY>
> > </HTML>
> >
> > Thanks,
> > wimpy
> >
> >  XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
> >
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://messenger.msn.co.uk


 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