This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Simplified production for FilterExpr in XPath spec?


> The production in the XPath spec for FilterExpr is:
> 
>     FilterExpr ::= PrimaryExpr | FilterExpr Predicate
> 
> It would seem that the following rewritten version would be
> much more transparent:
> 
>     FilterExpr ::= PrimaryExpr  Predicate*
> 
> (A number of other productions, e.g., OrExpr, could be
> similarly rewritten.)
> 
> Does anyone know why the production was written the way it
> was?

The two productions are completely equivalent, and the fact that XPath
switches at random between the "recursive" style and the "iterative" style
suggests to me that no thought was given to the matter. I suspect they were
written by different people. Which you prefer is entirely a matter of
personal taste.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]