-test("basic xpath", function() {
- expect(15);
- ok( jQuery.find("//*").length >= 30, "All Elements (//*)" );
- t( "All Div Elements", "//div", ["main","foo"] );
- t( "Absolute Path", "/html/body", ["body"] );
- t( "Absolute Path w/ *", "/* /body", ["body"] );
- t( "Long Absolute Path", "/html/body/dl/div/div/p", ["sndp","en","sap"] );
- t( "Absolute and Relative Paths", "/html//div", ["main","foo"] );
- t( "All Children, Explicit", "//code/*", ["anchor1","anchor2"] );
- t( "All Children, Implicit", "//code/", ["anchor1","anchor2"] );
- t( "Attribute Exists", "//a[@title]", ["google"] );
- t( "Attribute Equals", "//a[@rel='bookmark']", ["simon1"] );
- t( "Parent Axis", "//p/..", ["main","foo"] );
- t( "Sibling Axis", "//p/../", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","iframe","lengthtest","table","sndp","en","sap"] );
- t( "Sibling Axis", "//p/../*", ["firstp","ap","foo","first","firstUL","empty","form","floatTest","iframe","lengthtest","table","sndp","en","sap"] );
- t( "Has Children", "//p[a]", ["firstp","ap","en","sap"] );
-
- $("#foo").each(function() {
- isSet( $("/p", this).get(), q("sndp", "en", "sap"), "Check XPath context" );
- });