This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Simplified production for FilterExpr in XPath spec?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Simplified production for FilterExpr in XPath spec?
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Tue, 18 Jul 2000 09:04:27 +0100
- Reply-To: xsl-list at mulberrytech dot com
> 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