Subject: Re: [xsl] XPath grammar questions From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Sun, 17 Mar 2002 20:13:25 +0200 |
The first case is in a path submitted by Tobias Reif, that originated, as I recall, from someone on this list:No, it says that *required* type of the argument must be boolean. Generally that is FunctionCall production (see http://www.w3.org/TR/xpath.html#NT-FunctionCall):
*[* and not(*/node()) and not(*[not(@style)]) and not(*/@style != */@style)]
Specifically, it's the 'not(*/node())' that I'm having trouble with. The XPath spec states that:
not( boolean ) -> boolean
This would imply that '*/node()' evaluates to a boolean.
The second (and at this point, more critical) problem I'm having is with function names. Take:
[normalize-space(@name)='x']
If you follow the grammar, the evaluation is:
Predicate->Expr->OrExpr->AndExpr->EqualityExpr->RelationalExpr-> AdditiveExpr
at which point it matches the rule:
AdditiveExpr:: AdditiveExpr '-' MultiplicativeExpr
No, lexer must return the longest token, which is "normalize-space" as NCName.
where you effectively have "normalize" "-" "space(@name)='x'".
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath grammar questions, David Carlisle | Thread | RE: [xsl] XPath grammar questions, Michael Kay |
Re: [xsl] XPath grammar questions, David Carlisle | Date | [xsl] Re: XPath grammar questions, Dimitre Novatchev |
Month |