liaojinxing / firepath

Automatically exported from code.google.com/p/firepath
GNU General Public License v3.0
0 stars 0 forks source link

wishlist: add jquery-like shortcuts for attrib-select operators #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I think it would be cool if fire-xpath supported the following
jQuery-specific operators for attribute selection, see below or here:
http://api.jquery.com/category/selectors/

(if you don't want to "pollute" firexpath with nonstandard features, you
could, alternatively, publish an enhanced/second version of fire-xpath )

#
Attribute Contains Prefix Selector [name|=value]

Selects elements that have the specified attribute with a value either
equal to a given string or starting with that string followed by a hyphen (-).

#
Attribute Contains Selector [name*=value]

Selects elements that have the specified attribute with a value containing
the a given substring.

#
Attribute Contains Word Selector [name~=value]

Selects elements that have the specified attribute with a value containing
a given word, delimited by spaces.

#
Attribute Ends With Selector [name$=value]

Selects elements that have the specified attribute with a value ending
exactly with a given string.

#
Attribute Equals Selector [name=value]

Selects elements that have the specified attribute with a value exactly
equal to a certain value.

#
Attribute Not Equal Selector [name!=value]

Select elements that either don't have the specified attribute, or do have
the specified attribute but not with a certain value.

#
Attribute Starts With Selector [name^=value]

Selects elements that have the specified attribute with a value beginning
exactly with a given string.

Original issue reported on code.google.com by knb.fin...@gmail.com on 6 Jun 2010 at 8:31

GoogleCodeExporter commented 9 years ago
I have patched the current firepath to support Sizzle (the selector engine for 
jQuery). See http://code.google.com/p/firepath/issues/detail?id=22.

Original comment by coolr...@gmail.com on 15 Mar 2011 at 3:15

GoogleCodeExporter commented 9 years ago
This is now supported by using Sizzle (which is what jQuery uses). See 
http://code.google.com/p/firepath/issues/detail?id=22.

Original comment by d...@studgeek.com on 29 Jul 2011 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by pierre.t...@gmail.com on 9 Jun 2013 at 1:04