Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XMLDocument.evaluate is not a function

17 views
Skip to first unread message

Gary van der Merwe

unread,
Aug 30, 2005, 9:31:46 PM8/30/05
to
Hi

Another 3:25AM head scratcher.


I'm getting the following error:

Error: responseXml.evaluate is not a function
Source File:
file:///C:/Program%20Files/sunbird/extensions/%7BC1A207F4-634F-4939-BCC7-5A56AA307077%7D/components/calExchangeCalendar.js
Line: 138

My code looks like this: (e is the event prameter of the onload of my
XmlHTTPRequest)
var responseXml = e.target.responseXML;

var responses = responseXml.evaluate('DAV:multistatus/DAV:response',
responseXml, NSResolver, 5, null);

This is happening in a nightly trunk of Sunbird:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1)
Gecko/20050828 Mozilla Sunbird/0.2+

Any Ideas?

Gary

Gary van der Merwe

unread,
Aug 30, 2005, 10:01:49 PM8/30/05
to

Gary van der Merwe

unread,
Sep 1, 2005, 3:56:18 AM9/1/05
to
Hi

I'm still stuck with this.

I think I read somewhere that XPath is an optional build component, but
I checked
http://lxr.mozilla.org/mozilla/source/calendar/sunbird/config/mozconfig
and there is no --disable-xpath. I don't realy understand how the build
system's options work, so I'm not sure wether or not the XPath is ment
to be there or not.

Can any one assist me here?


Gary

Emmanouil Batsis

unread,
Sep 1, 2005, 4:54:42 AM9/1/05
to

This may be irrelevant but since there is no other answer...

AFAIK, XmlHTTPRequest.responseXml is a DOM compatible object but not
actually an XMLDocument, so it may actually not support evaluate as
XMLDocument and Document do. You could try to reparse, or better, copy
the nodes into an XMLDocument and use that for XPath evaluation.

hth.

Manos

Gary van der Merwe

unread,
Sep 1, 2005, 8:20:01 AM9/1/05
to
Hi

I checked the type of the value returned from responseXml with venkman
and it is XMLDocument.

Thanks though.

Gary

Martin Honnen

unread,
Sep 1, 2005, 9:47:16 AM9/1/05
to

Gary van der Merwe wrote:

> I checked the type of the value returned from responseXml with venkman
> and it is XMLDocument.

I don't know Sunbird and in which context you use script there but I
tried some simple script example in a HTML document loaded with a recent
Firefox nightly trunk build and responseXML.evaluate works fine there.
So what are you doing exactly, simply creating
new XMLHttpRequest()
in a script?


--

Martin Honnen
http://JavaScript.FAQTs.com/

Christian Biesinger

unread,
Sep 1, 2005, 10:27:45 AM9/1/05
to
Gary van der Merwe wrote:
> I think I read somewhere that XPath is an optional build component, but
> I checked
> http://lxr.mozilla.org/mozilla/source/calendar/sunbird/config/mozconfig
> and there is no --disable-xpath.

It's probably an extension, and sunbird's default extension list is in
configure.in:
4126 MOZ_EXTENSIONS_DEFAULT=pref xmlextras transformiix

I don't know whether that includes XPath, though...

Christian Biesinger

unread,
Sep 1, 2005, 10:35:38 AM9/1/05
to
Christian Biesinger wrote:
> 4126 MOZ_EXTENSIONS_DEFAULT=pref xmlextras transformiix
>
> I don't know whether that includes XPath, though...

Oh, heh. That's a bug in the configure script - the variable must be quoted:
/home/chb/mozilla/configure: line 12669: xmlextras: command not found

Christian Biesinger

unread,
Sep 1, 2005, 10:46:51 AM9/1/05
to
Christian Biesinger wrote:
> Oh, heh. That's a bug in the configure script - the variable must be
> quoted:
> /home/chb/mozilla/configure: line 12669: xmlextras: command not found

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=306701

Gary van der Merwe

unread,
Sep 2, 2005, 12:58:34 AM9/2/05
to
Thanks Christian!

0 new messages