Re: [jQuery] XPath query whoas/bugs?
Stephen Woodbridge schrieb: John, Thank you for looking at this. Removing the '//' helps a little. Now both the alerts work in FF, and in IE6 it no longer throws an error, but both of the searches in IE6 appear to return a null string (ie: '') Also changing the first alert to: alert(' + $('/html/body/xml/[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]').text() + '); works on FF but throws an error on IE6. This might be a clue about what is going on. #164 is not yet resolved, see my latest comment there. http://jquery.com/dev/bugs/bug/164/ IE reacts really weird when using getAttribute on an XML element. Looks like we need some more workarounds. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XPath query whoas/bugs?
Jörn - #164 is not yet resolved, see my latest comment there. http://jquery.com/dev/bugs/bug/164/ IE reacts really weird when using getAttribute on an XML element. Looks like we need some more workarounds. That code has already been changed in SVN. Please make sure that you're current. I think we should fix a couple more bugs then just push out 1.0.3 very soon. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XPath query whoas/bugs?
John Resig wrote: Jörn - #164 is not yet resolved, see my latest comment there. http://jquery.com/dev/bugs/bug/164/ IE reacts really weird when using getAttribute on an XML element. Looks like we need some more workarounds. That code has already been changed in SVN. Please make sure that you're current. I think we should fix a couple more bugs then just push out 1.0.3 very soon. Just grabbed svn and $(document).ready(function(){alert(hello)}); does not fire on IE. http://imaptools.com:8081/maps/test2.html -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XPath query whoas/bugs?
John Resig wrote: Just grabbed svn and $(document).ready(function(){alert(hello)}); does not fire on IE. Sorry about that, it's now fixed in SVN rev 442. NP, thanks for the updates. OK, this is good in FF, in IE6 no errors, but returns a '' for the xpath queries instead of the correct results. This is a simple self contained test page except for including jquery.js http://imaptools.com:8081/maps/test2.html -Steve ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XPath query whoas/bugs?
Stephen - After doing some testing, it seems as if the culprit is the '//' that you have in front of your expression. It's perfectly ok to remove it - as it will continue to work correctly. It seems to be that if you do .find(//foo) or $(//foo, context) it freaks out. But this is ok, since doing that is completely redundant in jQuery. Just remove the // to make it .find(foo) or $(foo, context) and you'll be fine. I'm still not entirely sure /why/ this happens - but it does. Here's the ticket for it: http://jquery.com/dev/bugs/bug/281/ Does changing this fix the problems that you were having related to bug #164? --John On 10/14/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Hi all, I am trying to figure out xpath queries, but I am missing something and/or running into bugs. John pointed me at Bug #164, which has been closed, but I still have problems. Here is a simple script with two alerts. Each alert should report United States from the embedded xml. o The 1st alert works on on FF but not IE6 o The 2nd alert does not work on either Are these bugs? Do I need to open a bug on these? Am I doing this wrong? Thanks, -Steve Here is a url to test it: http://imaptools.com:8081/maps/test2.html Here is source: html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head script type=text/javascript src=/js/jquery.js/script script type=text/javascript $(document).ready(function(){ // get the xml data island var xml = $(#aaa); // this searches the dom and works in FF but not IE 6 alert( $('//[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]' ).text()); // this should search using the xml variable as context // this does not work in either FF or IE6 alert( $('//[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]', xml ).text()); }); /script /head body xml id=aaa style=display: none; point srsName=geographic coordinates -71.385697,42.636016 /coordinates /point feature typeName=country description Country /description property typeName=NAME United States /property property typeName=CAPITAL Washington DC /property property typeName=CONTINENT North America /property property typeName=DISTANCE_TO_POINT typeUnits=feet 0 /property /feature /xml /body /html ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- John Resig http://ejohn.org/ [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] XPath query whoas/bugs?
John, Thank you for looking at this. Removing the '//' helps a little. Now both the alerts work in FF, and in IE6 it no longer throws an error, but both of the searches in IE6 appear to return a null string (ie: '') Also changing the first alert to: alert(' + $('/html/body/xml/[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]').text() + '); works on FF but throws an error on IE6. This might be a clue about what is going on. -Steve John Resig wrote: Stephen - After doing some testing, it seems as if the culprit is the '//' that you have in front of your expression. It's perfectly ok to remove it - as it will continue to work correctly. It seems to be that if you do .find(//foo) or $(//foo, context) it freaks out. But this is ok, since doing that is completely redundant in jQuery. Just remove the // to make it .find(foo) or $(foo, context) and you'll be fine. I'm still not entirely sure /why/ this happens - but it does. Here's the ticket for it: http://jquery.com/dev/bugs/bug/281/ Does changing this fix the problems that you were having related to bug #164? --John On 10/14/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Hi all, I am trying to figure out xpath queries, but I am missing something and/or running into bugs. John pointed me at Bug #164, which has been closed, but I still have problems. Here is a simple script with two alerts. Each alert should report United States from the embedded xml. o The 1st alert works on on FF but not IE6 o The 2nd alert does not work on either Are these bugs? Do I need to open a bug on these? Am I doing this wrong? Thanks, -Steve Here is a url to test it: http://imaptools.com:8081/maps/test2.html Here is source: html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head script type=text/javascript src=/js/jquery.js/script script type=text/javascript $(document).ready(function(){ // get the xml data island var xml = $(#aaa); // this searches the dom and works in FF but not IE 6 alert( $('//[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]' ).text()); // this should search using the xml variable as context // this does not work in either FF or IE6 alert( $('//[EMAIL PROTECTED]country]/[EMAIL PROTECTED]NAME]', xml ).text()); }); /script /head body xml id=aaa style=display: none; point srsName=geographic coordinates -71.385697,42.636016 /coordinates /point feature typeName=country description Country /description property typeName=NAME United States /property property typeName=CAPITAL Washington DC /property property typeName=CONTINENT North America /property property typeName=DISTANCE_TO_POINT typeUnits=feet 0 /property /feature /xml /body /html ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/