Closed Bug 338263 Opened 18 years ago Closed 18 years ago

instance() function should return empty nodeset on invalid instances

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

()

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(1 file)

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]
Depends on: 321876
Assignee: aaronr → allan
Component: XForms → XSLT
Attached patch PatchSplinter Review
Attachment #222321 - Flags: review?(aaronr)
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+
(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
Attachment #222321 - Flags: superreview?(bugmail)
Attachment #222321 - Flags: superreview?(bugmail) → superreview+
Fixed on trunk.
Comment on attachment 222321 [details] [diff] [review]
Patch

This only influences XForms, so it should be harmless.
Attachment #222321 - Flags: approval1.8.0.5?
(In reply to comment #4)
> Fixed on trunk.

Ooops, tree was closed :(
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+
checked into 1.8.0.5
Keywords: fixed1.8.0.5
Attachment #222321 - Flags: approval-branch-1.8.1?
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+
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.
Doh!  Forgot to close it.  Thanks for the heads up!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: