W3C home > Mailing lists > Public > www-xml-query-comments@w3.org > April 2002

Wrong with Path and my suggestion about PathExpr,esp. literals.

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:
   We hope that we will get the result of a boolean value TRUE.But in the FS,the parsing tree is(for "a" only):
   Then do normalization as the FS told us:
   Because of these rules:

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:16 UTC