Closed Bug 293428 Opened 20 years ago Closed 18 years ago

FunctionCall helper functions drop error codes.

Categories

(Core :: XSLT, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: johnathan.conley, Assigned: peterv)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

The xpath upper-case() function does not appear to be functioning properly.

Reproducible: Always

Steps to Reproduce:
Copy the below html into a file and load into Firefox.
The top expression works as expected (returns 2) - but the following statement
using upper-case() is returning 0 (should return 2)

<b>hello world</b>
<script>
alert(document.evaluate('//*[contains(text(),"world")]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength);
alert(document.evaluate('//*[contains(upper-case(text()),"WORLD")]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength);
</script>

Actual Results:  
First statement returns 2
Second statement returns 0

Expected Results:  
Both statements should return 2
Assignee: nobody → peterv
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → 1.0 Branch
There is no upper-case function. Neither in XPath 1.0 nor in XSLT 1.0.
(There is one in XPath2.0, which we don't support. That would have had to be
namespaced, of course.)
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Actually, let's reuse this bug on the lack of error reporting.
Severity: normal → major
Status: RESOLVED → UNCONFIRMED
OS: Windows XP → All
Hardware: PC → All
Resolution: INVALID → ---
Summary: xpath upper-case not evaluating properly → FunctionCall helper functions drop error codes.
Version: 1.0 Branch → Trunk
Makes sense. Adding to the confusion, I tried the matches() method (xpath2.0) -
and it did thow a JavaScript error.
Also, if you run contains(upper-case(text()),upper-case("world")) - it evaluates
true for all nodes. (it seems upper-case is evaluating (to null or some value)
instead of stop-processing or dropping an error code)
Cheers
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file Testcase
Marking this WFM, testcase throws a INVALID_EXPRESSION_ERR.
Status: NEW → RESOLVED
Closed: 20 years ago18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: