Closed Bug 325750 Opened 19 years ago Closed 12 years ago

e4x/Expressions/11.1.4-08.js: inconsistencies in the use of {} syntax Part Deux

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bc, Unassigned)

References

Details

Attachments

(2 files)

continuation of bug 321549, bug 318922
Attached file shell script foo.js
Assuming I have the tests setup correctly, ... 50: FAIL expected: valid, actual: invalid input: u='http://a.uri/'; p='p'; a=<a xmlns:p={u}> <{p}:b>x</p:b> </a>; output: SyntaxError: illegal XML character 51: FAIL expected: valid, actual: invalid input: u='http://a.uri/'; p='p'; a=<a xmlns:pp={u}> <p{p}:b>x</pp:b> </a>; output: SyntaxError: illegal XML character 53: FAIL expected: valid, actual: invalid input: u='http://a.uri/'; p='p'; ns="ns"; a=<a xml{ns}:pp={u}> <{p}p:b>x</pp:b> </a>; output: SyntaxError: illegal XML character 54: FAIL expected: valid, actual: invalid input: u='http://a.uri/'; p='p'; ns="xmlns"; a=<a {ns}:pp={u}> <{p}p:b>x</pp:b> </a>; output: SyntaxError: illegal XML character 56: FAIL expected: valid, actual: invalid input: u='http://a.uri/'; p='pp'; a=<a xmlns:pp={u}> <{p}:b>x</pp:b> </a>; output: SyntaxError: illegal XML character
Checking in 11.1.4-08.js; /cvsroot/mozilla/js/tests/e4x/Expressions/11.1.4-08.js,v <-- 11.1.4-08.js initial revision: 1.1 If there are any errors in the test, let me know and I will fix them. I also renamed the incorrectly named tests e4x/Expressions/11.4.1-0[1-7] to match the correct section 11.1.4.
Flags: testcase+
Summary: E4X: inconsistencies in the use of {} syntax Part Deux → e4x/Expressions/11.1.4-08.js: inconsistencies in the use of {} syntax Part Deux
(In reply to comment #3) > If there are any errors in the test, let me know and I will fix them. At least according to the ECMA-357 ed. 2 I have, there seem to be at least 5-10 in here, judging by a scan through the FAILs from running the test. I'll look through the list and try to find the errors when I next have time to do so; the fixes for those things don't look like they should be too difficult.
Assignee: general → jwalden+bmo
Sections 50, 51, 53, 54, 56 are still failing. Shall I just remove them and invalidate this bug?
Blocks: e4x
(In reply to comment #2) According to the E4X specs 2nd. ed., the following JS code should be correct, but currently is considered invalid by the parser. Tested in Firefox 2.0.0.14: var attribs = 'a1="1" a2="2"'; var xml = <t {attribs}/>; (However, the following works well: var tag = 't a1="1" a2="2"'; var xml = <{tag}/>; )
There are lots of inconsistencies in the E4X spec 2nd ed., so I'm not sure if the following should be a valid JS. Acording to the syntax in 11.1.4, it should not be valid, but on the other hand there's an example on p.44, which contradicts the syntax: var a = "a"; var xml = <t {a}="1"/>; Moreover, when literally following the syntax, var a = "'1' b='2'"; var xml = <t a={a}/>; is equivalent to var xml = <t a='1' b='2'/>; instead of what was probably meant: var xml = <t a="'1' b='2'"/>; The inconsistencies are surely bugs in the E4X spec. But does SpiderMonkey handle these cases the way they were intended? That's why I report them here. I don't know how to report the inconsistencies in the spec to ECMA, perhaps you will.
Assignee: jwalden+bmo → general
E4X will be removed again from Spidermonkey (bug 788293)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: