e4x: xml:lang attribute in XML literal causes error

VERIFIED FIXED in mozilla1.8beta1

Status

()

P2
normal
VERIFIED FIXED
14 years ago
14 years ago

People

(Reporter: martin.honnen, Assigned: brendan)

Tracking

({js1.5})

Trunk
mozilla1.8beta1
x86
Windows XP
js1.5
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
Spidermonkey (at least when used in a Mozilla 1.8a nightly in a HTML page with
<script type="text/javascript; e4x=1">) on the following script
var xml = <root><text xml:lang="en">ECMAScript for XML</text></root>;
throws an error

Error: invalid XML namespace xml
Source File: http://home.arcor.de/martin.honnen/mozillaBugs/e4x/test2005010901.js
Line: 1, Column: 29
Source Code:
<parent xmlns=''><root><text xml:lang="en">ECMAScript for XML</text></root></parent>

Rhino processes the script without error and xml:lang attributes are quite
common and in my view should be possible in XML so Spidermonkey should process
the script without any error.

Test script is here:
<http://home.arcor.de/martin.honnen/mozillaBugs/e4x/test2005010901.js>

HTML test case using that script is here:
<http://home.arcor.de/martin.honnen/mozillaBugs/e4x/xmllangAttribute.html>
(Assignee)

Updated

14 years ago
Assignee: general → brendan
Keywords: js1.5
Priority: -- → P2
Target Milestone: --- → mozilla1.8beta
(Assignee)

Comment 1

14 years ago
Created attachment 170855 [details] [diff] [review]
proposed fix

Thanks to dbaron for the XML spec pointers (hint: don't look at the original
"1.0" era specs -- you need the "11" [for "1.1"] at the end of the spec's
filename).

/be
Attachment #170855 - Flags: review?(shaver)
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Comment on attachment 170855 [details] [diff] [review]
proposed fix

r=shaver
Attachment #170855 - Flags: review?(shaver) → review+
(Assignee)

Comment 3

14 years ago
Fixed, thanks.

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
(Reporter)

Comment 4

14 years ago
Verified fixed with Mozilla 1.8b (Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.8b) Gecko/20050122)
Status: RESOLVED → VERIFIED

Comment 5

14 years ago
Created attachment 174992 [details]
e4x/Regress/regress-277650.js

Martin, with your permission this will be included in the javascript test
library.

Comment 6

14 years ago
e4x/Regress/regress-277650.js checked in.

Updated

14 years ago
Flags: testcase+
You need to log in before you can comment on or make changes to this bug.