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:
Yorick Peterse 2014-11-05 00:45:40 +01:00
parent 661741268a
commit a586a512b8
2 changed files with 0 additions and 19 deletions

View File

@ -109,9 +109,6 @@ rule
# ns|foo
| T_IDENT T_PIPE T_IDENT { [val[0], val[2]] }
# |foo
| T_PIPE T_IDENT { [nil, val[1]] }
;
predicates

View File

@ -108,20 +108,4 @@ describe 'CSS selector evaluation' do
@set[2].should == @document.children[0].children[2]
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