Removed support for CSS such as "|X"
This expression could be used to get all elements that _don't_ have any namespace. The problem is that this can't be expressed as just a node test, instead the resulting XPath would have to look something like the following: X[local-name() = name()] However, since the XPath predicates are already created for pseudo classes and such, also injecting the above into it would be a real big pain. As such I've decided not to support it.
This commit is contained in:
parent
661741268a
commit
a586a512b8
|
@ -109,9 +109,6 @@ rule
|
||||||
|
|
||||||
# ns|foo
|
# ns|foo
|
||||||
| T_IDENT T_PIPE T_IDENT { [val[0], val[2]] }
|
| T_IDENT T_PIPE T_IDENT { [val[0], val[2]] }
|
||||||
|
|
||||||
# |foo
|
|
||||||
| T_PIPE T_IDENT { [nil, val[1]] }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
predicates
|
predicates
|
||||||
|
|
|
@ -108,20 +108,4 @@ describe 'CSS selector evaluation' do
|
||||||
@set[2].should == @document.children[0].children[2]
|
@set[2].should == @document.children[0].children[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'paths without namespaces and with name wildcards' do
|
|
||||||
before do
|
|
||||||
@set = evaluate_css(@document, 'a |*')
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like :node_set, :length => 2
|
|
||||||
|
|
||||||
example 'include the first <b> node' do
|
|
||||||
@set[0].should == @document.children[0].children[0]
|
|
||||||
end
|
|
||||||
|
|
||||||
example 'include the second <b> node' do
|
|
||||||
@set[1].should == @document.children[0].children[1]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue