Last Comment Bug 338263 - instance() function should return empty nodeset on invalid instances
: instance() function should return empty nodeset on invalid instances
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core
Classification: Components
Component: XSLT (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Allan Beaufour
: Stephen Pride
Mentors:
http://www.w3.org/TR/xforms/
Depends on: 321876
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-17 01:24 PDT by Allan Beaufour
Modified: 2006-06-20 12:46 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.84 KB, patch)
2006-05-17 01:33 PDT, Allan Beaufour
aaronr: review+
jonas: superreview+
jonas: approval‑branch‑1.8.1+
dveditz: approval1.8.0.5+
Details | Diff | Splinter Review

Description Allan Beaufour 2006-05-17 01:24:28 PDT
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]
Comment 1 Allan Beaufour 2006-05-17 01:33:59 PDT
Created attachment 222321 [details] [diff] [review]
Patch
Comment 2 aaronr 2006-05-17 10:00:23 PDT
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?
Comment 3 Allan Beaufour 2006-05-18 00:19:20 PDT
(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 :)
Comment 4 Allan Beaufour 2006-05-18 01:06:52 PDT
Fixed on trunk.
Comment 5 Allan Beaufour 2006-05-18 01:08:07 PDT
Comment on attachment 222321 [details] [diff] [review]
Patch

This only influences XForms, so it should be harmless.
Comment 6 Allan Beaufour 2006-05-18 01:11:36 PDT
(In reply to comment #4)
> Fixed on trunk.

Ooops, tree was closed :(
Comment 7 Allan Beaufour 2006-05-19 03:05:31 PDT
Fixed on trunk. Checked in on open tree this time...
Comment 8 Daniel Veditz [:dveditz] 2006-06-12 11:57:24 PDT
Comment on attachment 222321 [details] [diff] [review]
Patch

approved for 1.8.0 branch, a=dveditz for drivers
Comment 9 Doron Rosenberg (IBM) 2006-06-13 13:58:53 PDT
checked into 1.8.0.5
Comment 10 aaronr 2006-06-20 09:45:53 PDT
checked into 1.8 branch
Comment 11 Reed Loden [:reed] (use needinfo?) 2006-06-20 12:40:56 PDT
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 aaronr 2006-06-20 12:46:19 PDT
Doh!  Forgot to close it.  Thanks for the heads up!

Note You need to log in before you can comment on or make changes to this bug.