This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Mozilla XML > September 2005 > XMLDocument.evaluate is not a function





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author XMLDocument.evaluate is not a function
Gary van der Merwe

2005-08-30, 11:22 pm

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

2005-09-01, 7:36 am

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/sour...onfig/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

2005-09-01, 7:36 am

Gary van der Merwe wrote:
> 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/sour...onfig/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?


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

2005-09-01, 7:42 pm

Hi

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

Thanks though.

Gary

Martin Honnen

2005-09-01, 7:42 pm



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

2005-09-01, 7:42 pm

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/sour...onfig/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

2005-09-01, 7:42 pm

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

2005-09-01, 7:42 pm

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

2005-09-02, 4:31 am

Thanks Christian!

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews