[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Implementing Equality Expressions...

Subject: Re: Implementing Equality Expressions...
From: James Clark <jjc@xxxxxxxxxx>
Date: Sat, 02 Jan 1999 09:09:01 +0700
xsl equality expression
I don't understand exactly what the problem you're having is, but there
are a couple of tricks you can use to parse And/Or expressions:

- one is to keep some state in the lexer; this is the way the spec does
it: "An OperatorName token is recognized only when there is a preceding
token and the preceding token is not one of @, /, |, (, [ or an
OperatorName."

- the other is to parse a BooleanExpr as if it were

BooleanExpr ::= BooleanPrimaryExpr (Name BooleanPrimaryExpr)*

and then check separately that each Name is either "and" or "or" and are
not mixed in a BooleanExpr (this is what I do in XT)/

Tyler Baker wrote:
> 
> In the XSL Spec Boolean Expressions are defined as follows...
> 
> BooleanExpr ::= AndExpr | OrExpr | BooleanPrimaryExpr
> BooleanPrimaryExpr ::= BooleanGroupExpr | NotExpr | PositionalExpr |
> TestExpr | EqualityExpr
> 
> When trying to parse an equality expression directly, I have found that
> it is very difficult to separate the SelectExpression from the Literal
> when and expressions or or expressions are also present.
> 
> The algorithm I use is basically is to find the first '=' that is not in
> a nested expression "anything inside '(' and ')'" and not inside a
> literal.  The problem arises is that if you encounter an "and" or an
> "or" then you will

Part of the sentence seems to be missing.

James



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.