- From: Phenix Shieh <phenix_shieh@hotmail.com>
- Date: Thu, 11 Apr 2002 20:02:05 +0800
- To: <www-xml-query-comments@w3.org>
- Message-ID: <OE15wd26OUDxTcg2yWs00003b8c@hotmail.com>
For example,if we want to analyse this XQuery:
"a"="b"
We hope that we will get the result of a boolean value TRUE.But in the FS,the parsing tree is(for "a" only):
Expr->PathExpr->RelativePathExpr->StepExpr->GeneralStep->PrimaryExpr->Literal->StringLiteral="a"
Then do normalization as the FS told us:
[PathExpr]==[RelativePathExpr]==[StepExpr]==[GeneralStep]
Because of these rules:
[PrimaryExpr]Path
==
typeswitch [PrimaryExpr]Expr as $fs:new
case node* return $fs:new
default return dm:error()
[PrimaryExpr StepQualifiers]Path
==
[[PrimaryExpr]Path StepQualifiers]ForwardPath
The simple string "a" will be normalized to:
---------------------------------------------
typeswitch "a" as $fs:new
case node* return $fs:new
default return error()
---------------------------------------------
If as the FS told us,we will get the ERROR though surely it is not.
Anyway,this is wrong!So I think why not separate the Literals from the normalization rule?
My suggestion is that separate the literals form the path expression and as a standalone expression.This means that we should modify the XQuery Grammar slightly:when parsing,let the Literals have a higher priority,so a simple literal will not be recognised as a path expr.从网站得到更多信息。MSN Explorer 免费下载:http://explorer.msn.com/lccn
Received on Thursday, 11 April 2002 07:58:42 UTC