Closed
Bug 369522
Opened 18 years ago
Closed 18 years ago
XPath abbreviated steps should not support predicates
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 164822
People
(Reporter: ap, Unassigned)
Details
Attachments
(1 file)
739 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ru-ru) AppleWebKit/418.9 (KHTML, like Gecko) Safari/419.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a2pre) Gecko/20070206 Minefield/3.0a2pre
As far as I can tell, XPath syntax such as ".[@class='test']" is invalid in XPath 1.0, so I think that XPathEvaluator::evaluate() should raise an exception when trying to compile it. However, I'm not getting any exception in the attached test case.
Below is why I think that the syntax is invalid.
See rule 4 - an abbreviated step cannot have predicates.
[4] Step ::= AxisSpecifier NodeTest Predicate*
| AbbreviatedStep
Also, see rule 20 - since "." is not a PrimaryExpr, it cannot start a FilterExpr either.
[20] FilterExpr ::= PrimaryExpr
| FilterExpr Predicate
Reproducible: Always
Reporter | ||
Comment 1•18 years ago
|
||
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•