Closed Bug 330579 Opened 19 years ago Closed 19 years ago

Invalid bind/xpath doesn't cause xforms-compute-error

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: aaronr)

References

Details

(Keywords: fixed1.8.0.4, fixed1.8.1)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060315 Firefox/1.6a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060315 Firefox/1.6a1 This is part of XForms 1.0 test suite, test case: "3.3.3.a2 submission element has invalid bind attribute". I receive an log entry in Console: Error: XForms Error (6): Error evaluating nodeset expression: /invalid car/invalid make Source File: file:///C:/work/eclipse/workspaces/primary-20050928/XForms10_Test_Suite_Work/Mozilla1.0/Chapt3/3.3/3.3.3/3.3.3.a2.xhtml Line: 0 Source Code: <xforms:bind id="make_bind" nodeset="/invalid car/invalid make"/> Reproducible: Always Steps to Reproduce: 1. Load test case 2. observe Console message 3. observe no modal message for xforms-compute-error Expected Results: Should see modal message (perhaps not console popup)
Attached file test case (deleted) —
Likewise for test case: 4.5.4.a xforms-compute-exception Appears this event is not being fired.
Summary: Invalid bind/xpath on submission doesn't cause xforms-compute-error → Invalid bind/xpath doesn't cause xforms-compute-error
We do fire this event, but just when evaluating the xpath expressions for the model item properties. Looks like what we need to do to fix the first one is to check the return code from the evaluation of the nodeset in nsXFormsModelElement::ProcessBind() to see if it is NS_ERROR_DOM_INVALID_EXPRESSION_ERR and if it is, throw the eEvent_ComputeException event. Otherwise throw the eEvent_BindingException. For the second testcase, we DO dispatch the compute exception event but since the DOMContentLoaded event hasn't happened yet, the XML event listeners aren't attached at this point so the form author's handler can't handle the event. This is a known bug, bug 315712
Blocks: 322255
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attached patch patch (deleted) — Splinter Review
we'll now dispatch a compute exception for bad xpath expression during nodeset evaluation. Still won't see the popup message due to bug 315712
Attachment #215166 - Flags: review?(smaug)
Attachment #215166 - Flags: review?(doronr)
Attachment #215166 - Flags: review?(smaug) → review+
Attachment #215166 - Flags: review?(doronr) → review+
checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Blocks: 332853
Whiteboard: xf-to-branch
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: