XMLPI containing only a space is rejected

VERIFIED INVALID

Status

()

Core
JavaScript Engine
VERIFIED INVALID
11 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({testcase})

Trunk
PowerPC
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
js> function() { var y = <? ?> }
typein:13: SyntaxError: invalid XML markup:
typein:13: function() { var y = <? ?> }
typein:13: .....................^

Page 21 of the E4X spec makes it sound like this should be accepted.

Comment 1

11 years ago
XML PIs have to start with an XMLName, just like elements.

Not OK: < foo></ foo>
Not OK: <? foo?>
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

11 years ago
Waldo pointed me to section 11.1.4 of the E4X spec, which says:

"The syntactic grammar for XML initialisers is used to find the end of XML initialisers and evaluate embedded  expressions. It permits sequences of characters that are not valid XML syntax. After evaluating all embedded  expressions, the resulting string of characters comprising the XML value is passed to the XML constructor, which parses it according to the more stringent XML grammar."

And sayrer pointed me to http://www.w3.org/TR/REC-xml/#sec-pi .

So I'm verifying this as invalid.

I'll file a new bug on <??> being accepted.
Status: RESOLVED → VERIFIED
(Reporter)

Comment 3

11 years ago
> I'll file a new bug on <??> being accepted.

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