Closed Bug 277929 Opened 20 years ago Closed 20 years ago

Error in XForms XPath parser

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

()

Details

Attachments

(3 files)

It aborts on this (valid) expression: "value[@no >= ../from and @no <=
../to]".

It's a problem in the parser, which triggers a call to the
XPathCompilerException-hack.
Attached file test case
Status: NEW → ASSIGNED
Maybe I should note that is in nsXFormsXPathParser, not the Transformiix code,
so the bug is all mine :)
it's too bad that xforms has to have its own xpath parser. What kind of
information do you guys need to get from a parsed xpath expression? Maybe
transformiix could expose some interface that let you get information out of a
parsed nsIDOMXPathExpression?
(In reply to comment #3)
> it's too bad that xforms has to have its own xpath parser.

You are absolutely right! I just ported some existing code to get us started.

> What kind of information do you guys need to get from a parsed xpath
> expression? Maybe transformiix could expose some interface that let you get
> information out of a parsed nsIDOMXPathExpression?

That has been my idea all the time (see bug 265212). I've talked a bit with pike
and peterv about it, but none of us has gotten further than thinking I suppose.
here is a testcase with a much simpler expression that also shows the bug
Attached patch FixSplinter Review
A misunderstanding of the semantics of EqualsASCII().
Attachment #175437 - Flags: review?(doronr)
Comment on attachment 175437 [details] [diff] [review]
Fix

r=me
Attachment #175437 - Flags: review?(doronr) → review+
Chcked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: