Closed
Bug 287910
Opened 20 years ago
Closed 20 years ago
XML initializer with single processing instruction is not recognized
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 257679
People
(Reporter: martin.honnen, Assigned: igor)
Details
Attachments
(1 file)
|
284 bytes,
text/plain
|
Details |
The section 11.1.4 XML Initialiser in the E4X specification says:
"An XML initialiser is an expression describing the initialization of an XML
object, written in a form of a literal. It may specify an XML element, an XML
comment, an XML PI, or a CDATA section using ordinary XML syntax."
That suggests to me that it should possible to write an XML initializer
representing a single processing instruction for instance. And indeed the test case
XML.ignoreProcessingInstructions = false;
print("XML.ignoreProcessingInstructions: " + XML.ignoreProcessingInstructions);
var pi = <?process Kibology="on"?>;
if (pi) {
print('pi.nodeKind(): ' + pi.nodeKind());
}
else {
print('pi === undefined: ' + (pi === undefined));
}
is parsed and executed flawlessly with Spidermonkey:
js> load('mozillaBugs/e4x/singleProcessingInstruction1.js');
XML.ignoreProcessingInstructions: false
pi.nodeKind(): processing-instruction
With Rhino however parsing gives syntax errors:
Rhino 1.6 release 1 2004 11 30
js> load('mozillaBugs/e4x/singleProcessingInstruction1.js');
js: "C:\Dokumente und Einstellungen\All
Users\Dokumente\javascript\mozillaBugs\e4x\singleProcessingInstruction1.js",
line 5: syntax error
js: print('pi.nodeKind(): ' + pi.nodeKind());
js: ..........................................^
js: "C:\Dokumente und Einstellungen\All
Users\Dokumente\javascript\mozillaBugs\e4x\singleProcessingInstruction1.js",
line 6: syntax error
js: }
js: ^
js: "C:\Dokumente und Einstellungen\All
Users\Dokumente\javascript\mozillaBugs\e4x\singleProcessingInstruction1.js",
line 1: Compilation produced 2 syntax errors.
If the Spidermonkey behaviour is correct then Rhino has a bug.| Reporter | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
*** This bug has been marked as a duplicate of 257679 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•