instance() function should return empty nodeset on invalid instances

RESOLVED FIXED

Status

()

Core
XSLT
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Allan Beaufour, Assigned: Allan Beaufour)

Tracking

({fixed1.8.0.5, fixed1.8.1})

Trunk
fixed1.8.0.5, fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
Right now we fail if the instance() function points to an invalid instance (bug 321876). I believe we should "fail" more gracefully, and return the empty node-set.

"In all other cases, an empty node-set is returned."
[http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-instance]
(Assignee)

Updated

11 years ago
Depends on: 321876
(Assignee)

Updated

11 years ago
Assignee: aaronr → allan
Component: XForms → XSLT
(Assignee)

Comment 1

11 years ago
Created attachment 222321 [details] [diff] [review]
Patch
Attachment #222321 - Flags: review?(aaronr)

Comment 2

11 years ago
Comment on attachment 222321 [details] [diff] [review]
Patch

>? semantic.cache
>? xf.patch
>Index: txXFormsFunctionCall.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/content/xslt/src/xpath/txXFormsFunctionCall.cpp,v
>retrieving revision 1.10
>diff -u -p -U8 -r1.10 txXFormsFunctionCall.cpp
>--- txXFormsFunctionCall.cpp	6 Apr 2006 06:12:24 -0000	1.10
>+++ txXFormsFunctionCall.cpp	17 May 2006 08:30:44 -0000
>@@ -1,9 +1,9 @@
>-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
>+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

never seen this type of change before.  Intentional?
Attachment #222321 - Flags: review?(aaronr) → review+
(Assignee)

Comment 3

11 years ago
(In reply to comment #2)
> >--- txXFormsFunctionCall.cpp	6 Apr 2006 06:12:24 -0000	1.10
> >+++ txXFormsFunctionCall.cpp	17 May 2006 08:30:44 -0000
> >@@ -1,9 +1,9 @@
> >-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
> >+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
> 
> never seen this type of change before.  Intentional?

Yes, that's the actual style used in the file, so I got tired of Emacs not following that :)
Status: NEW → ASSIGNED
(Assignee)

Updated

11 years ago
Attachment #222321 - Flags: superreview?(bugmail)
Attachment #222321 - Flags: superreview?(bugmail) → superreview+
(Assignee)

Comment 4

11 years ago
Fixed on trunk.
(Assignee)

Comment 5

11 years ago
Comment on attachment 222321 [details] [diff] [review]
Patch

This only influences XForms, so it should be harmless.
Attachment #222321 - Flags: approval1.8.0.5?
(Assignee)

Comment 6

11 years ago
(In reply to comment #4)
> Fixed on trunk.

Ooops, tree was closed :(
(Assignee)

Comment 7

11 years ago
Fixed on trunk. Checked in on open tree this time...
Comment on attachment 222321 [details] [diff] [review]
Patch

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #222321 - Flags: approval1.8.0.5? → approval1.8.0.5+

Comment 9

11 years ago
checked into 1.8.0.5
Keywords: fixed1.8.0.5

Updated

11 years ago
Attachment #222321 - Flags: approval-branch-1.8.1?

Updated

11 years ago
Attachment #222321 - Flags: approval-branch-1.8.1? → approval-branch-1.8.1?(bugmail)
Attachment #222321 - Flags: approval-branch-1.8.1?(bugmail) → approval-branch-1.8.1+

Comment 10

11 years ago
checked into 1.8 branch
Keywords: fixed1.8.1
Any reason why is this bug still open?
Comments seem to show this fix has been committed to the trunk, 1.8, and 1.8.0 branches.

Comment 12

11 years ago
Doh!  Forgot to close it.  Thanks for the heads up!
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.