Show error on invalid qname for lazy created node

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
a year ago

People

(Reporter: surkov, Assigned: aaronr)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

1.10 KB, application/xhtml+xml
Details
3.00 KB, patch
Allan Beaufour
: review+
Doron Rosenberg (IBM)
: review+
Details | Diff | Splinter Review
(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051116 Firefox/1.6a1

When xforms control has reference on instance node attribute then xforms error dialog is appeared bug js console is empty.


<xforms:repeat id="repeat_id" nodeset="/instanceData/lazyVal">
 <xforms:input ref="@itemid"/>
</xforms:repeat>

Exception is throwing in nsXFormsUtils::EvaluateNodeBinding() method because "@itemid" is not valid QName (see http://lxr.mozilla.org/mozilla/source/extensions/xforms/nsXFormsUtils.cpp#559).

Reproducible: Always
(Reporter)

Comment 1

12 years ago
Created attachment 204017 [details]
testcase
(Assignee)

Comment 2

12 years ago
The binding exception is generated per spec: http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone

However, we should report the error to the JS console.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 3

12 years ago
(In reply to comment #2)
> The binding exception is generated per spec:
> http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone
> 
> However, we should report the error to the JS console.
> 

Error in JS console is the one issue. The other is it's not clear for me :)) why if the referenced node is a element then such node is created but if the referenced node is an attribute then exception is throwing. Why did specs workers define the such behaviour?
(Assignee)

Comment 4

12 years ago
(In reply to comment #3)
> (In reply to comment #2)
> > The binding exception is generated per spec:
> > http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#evt-modelConstructDone
> > 
> > However, we should report the error to the JS console.
> > 
> 
> Error in JS console is the one issue. The other is it's not clear for me :))
> why if the referenced node is a element then such node is created but if the
> referenced node is an attribute then exception is throwing. Why did specs
> workers define the such behaviour?
> 


I think that the working group viewed lazy authoring as just a bridge to helping former DHTML authors get into XForms.  So it will provide simple, quick instance data without any effort on the authors part.  Thus the term 'lazy'.  I guess that they felt that if the author had enough of an idea of the structure of their instance data to know what attributes go on what elements, then they should actually put instance data in an instance element to enforce that structure.  But that is just my thoughts on it.  I don't know the actual reason.

Feel free to write the forms forum www-forms@w3.org and see if you can get attributes added to lazy authoring in 1.1.  It is worth a shot.
(Assignee)

Comment 5

12 years ago
Created attachment 211306 [details] [diff] [review]
patch for jsconsole error output

patch that adds reporting error to console.
Attachment #211306 - Flags: review?(allan)
(Assignee)

Updated

12 years ago
Attachment #211306 - Flags: review?(doronr)

Comment 6

12 years ago
Comment on attachment 211306 [details] [diff] [review]
patch for jsconsole error output

XForms does need a better way to say "this is a lazy bind/ref/whatever", but that is a WG issue :)
Attachment #211306 - Flags: review?(doronr) → review+

Updated

12 years ago
Attachment #211306 - Flags: review?(allan) → review+
(Assignee)

Updated

12 years ago
Blocks: 326555

Comment 7

12 years ago
Checked in on 1_8_0
Status: NEW → ASSIGNED
Summary: repeat in lazy instance throws an exception → Show error on invalid qname for lazy created node

Comment 8

12 years ago
Check in on trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.