Bug Tracker

Ticket #144 (new )

Opened 2 years ago

Last modified 2 years ago

support of ancestor:: axis

Reported by: stripTM Assigned to: anonymous
Type: Priority:
Milestone: Component:
Version: Keywords: xpath axis
Cc: "" Needs:

Description

I am not able to succeed in xpath searches with axes. For example with simple searches as:

alert ($("//div/descendant::p").size());

I obtain the following error.

f has no properties (line 697) -> if ( f.constructor != String )

I am using the following version: $Date: 2006-08-25 23:51:03 -0400 (Fri, 25 Aug 2006) $

Attachments

Change History

Changed 2 years ago by john

  • status changed from new to closed
  • resolution set to wontfix

That's correct - jQuery doesn't support the (explicit) descendant axis, instead, you can write the above using a combination of XPath and CSS Selectors: $("//div p") or more simply: $("div p")

I don't really plan on including it, simply because it would add wait to the overall size of the file, without really adding any benefit.

Changed 2 years ago by striptm@…

  • keywords set to xpath axis
  • status changed from closed to reopened
  • type changed from bug to feature
  • resolution deleted
  • summary changed from xpath search with axes doesn't work to support of ancestor:: axis

Ok, and ancestor:: ancestor-or-self:: axis is supported? is better to use .ancestors()?

Changed 2 years ago by john

  • status changed from reopened to closed
  • resolution set to fixed

Correct, please use the additional methods for this, as opposed to the selectors.

Changed 2 years ago by http://viagra.free-blog-hosting.com/

<a href="http://viagra.free-blog-hosting.com/">cheap viagra</a> f1ngertest76651

Note: See TracTickets for help on using tickets.