Closed
Bug 291930
Opened 20 years ago
Closed 18 years ago
Setting ignoreComments to false discards contents if document starts with comment
Categories
(Rhino Graveyard :: E4X, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R6
People
(Reporter: lipp, Unassigned)
Details
Attachments
(1 file, 2 obsolete files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
If ignore comments is set to false, a comment preceeding the root node causes
the content of the XML (besides the comment) to be ignored.
Reproducible: Always
Steps to Reproduce:
Run this:
XML.ignoreComments = false;
var root = new XML("<!-- Sample --> <root/>");
print (root.toXMLString());
Actual Results:
<!-- Sample -->
Expected Results:
<!-- Sample --> <root/>
Comment 1•19 years ago
|
||
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Updated•19 years ago
|
Assignee: please_see_bug_288433 → nobody
Updated•18 years ago
|
Status: NEW → ASSIGNED
Comment 2•18 years ago
|
||
The XMLBeans implementation does as the reporter indicates, while the new DOM implementation (see bug 355677) blows up with a ClassCastException. However, reporter's "expected results" are also wrong; this call should in fact result in a SyntaxError (see ECMA357 10.3.1). I will patch the DOM code to generate the SyntaxError correctly.
Comment 3•18 years ago
|
||
Have checked in the fix for this.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 4•18 years ago
|
||
Attachment #254301 -
Flags: review?(bclary)
Comment 5•18 years ago
|
||
Don't know if this really pertains to a spec section or not.
Attachment #254301 -
Attachment is obsolete: true
Attachment #256637 -
Flags: review?(bclary)
Attachment #254301 -
Flags: review?(bclary)
Comment 6•18 years ago
|
||
Attachment #256637 -
Attachment is obsolete: true
Attachment #256638 -
Flags: review?(bclary)
Attachment #256637 -
Flags: review?(bclary)
Comment 7•18 years ago
|
||
Comment on attachment 256638 [details]
Re-renamed file :) ... to fit existing convention
approved with nits: modeline and contributor attribution. I've kept the initial developer info as you modified it but would really appreciate it after today if you can just take the normal boilerplate from the e4x/template.js file and modify that.
/cvsroot/mozilla/js/tests/e4x/XML/regress-291930.js,v <-- regress-291930.js
Attachment #256638 -
Flags: review?(bclary) → review+
Updated•18 years ago
|
Flags: in-testsuite+
Comment 8•18 years ago
|
||
Bob: I'm not following what you mean here in terms of (a) initial developer info and (b) modifying the normal boilerplate from the e4x/template.js file. I was working off what Gerv says in bug 329257 comment 8. As for (a) it would seem presumptuous for me to represent myself (or a bug reporter) as "Mozilla Foundation." As for (b) the two look the same to me but I may have missed something. :) I have several more tests sitting in my queue so I wanna get 'em right so that I can avoid the dreaded nits on batch #2. :) I understand the other two nits (mode and contributor list), and it seems you like my new filenams, so we're most of the way there ...
Comment 9•18 years ago
|
||
From my point of view, it's not that you are representing yourself as the Mozilla Foundation but how much ownership you want to claim on a test. For example, someone else files a bug with a testcase and you do the clerical work of wrapping it in the test framework. Are you the original author? I don't consider myself to be one when I do that (although I am an Corporation employee and probably shouldn't be one in any circumstance). Whenever I create tests I use the template.js, use the Foundation as the original and list the other people involved in filing the bug, creating the original test cases as the contributors and leave myself out of the loop altogether. I don't know that it matters, but if you are consciously doing it for a specific reason and it is ok with Gerv, then go head but if you don't care then I would prefer to just use the normal boilerplate from template.js in each directory so there is one less difference for us to worry about.
Comment 10•18 years ago
|
||
Bob: I hear you on the first part and I'm happy to list the bug reporter as the author of the original code (for example). It just seems odd to list Mozilla Foundation as the developer of that code when a bug reporter contributed the test as part of a bug report and I integrated it into the test framework and neither of us is affiliated with Mozilla (except in spirit). Gerv seems to indicate that the initial contributor ought to depend on who submits the code: "So if the files are your own work, then you are the Original Author." Several Rhino files do this -- when I wrote my original license parser, it was the first time I realized that we didn't put "Netscape Communications Corporation" in every file. No Rhino files list the Foundation (or none did when I did my initial license parsing code). So that combined with Gerv's comment is where I've taken my guidance from so far. But I am not a license ideologue and will do whatever we decide we do. :) I even have the process automated so that I can emit the license with the appropriate parameters via a command-line script. But my two cents are that saying that the Foundation is the author of the code just to make our housekeeping easier isn't taking the license seriously enough, even if I'm not a license stickler. And I feel even worse about it if the author wasn't me.
Comment 11•18 years ago
|
||
I don't think I am being flippant with regard to the license. Perhaps I worded my expression of my position unclearly. I guess it depends on how you place yourself in relation to the Foundation and whether you consider the Foundation separate from the Project and the Community. Are you positioned like IBM where they _are separate_ and clearly mark everything they touch and claim separate ownership or do you consider yourself as much a part of the Foundation as Gerv or Frank simply because you are a member of the community and wish the Foundation to be the clear owner? Finally, when more than one person is involved in the creation through the filing of the bug report, the creation of the initial testcase etc, it is the community (and therefore in my opinion the Foundation) that is the original author and not the person who did the labor of putting it altogether in a single file. If this is too much trouble, just mark the bug with a in-testsuite? and I'll do the clerical work for Rhino the same way I have for SpiderMonkey. If Gerv wishes to make the final call I'll abide by that.
Comment 12•18 years ago
|
||
(In reply to comment #11) > I guess it depends on how you place yourself in relation to the Foundation and > whether you consider the Foundation separate from the Project and the > Community. I'm happy to hear what the Foundation considers itself. The Foundation is a legal entity and I don't pay any dues or whatever so I don't really consider myself a "part" of it so much as a "supporter" or even a "fan." But I suppose I could. :) I mean (strangely enough) I also had an experience where I ran a rather large volunteer organization and I know that some volunteers referred to us as "us" and some volunteers referred to us as "you," and so I recognize that this is open to interpretation. > Are you positioned like IBM where they _are separate_ and clearly > mark everything they touch and claim separate ownership or do you consider > yourself as much a part of the Foundation as Gerv or Frank simply because you > are a member of the community and wish the Foundation to be the clear owner? No, my position (which is open to change) is that the license says what it says. If it said "owner" I'd happily sign it over. But it says "developer" and that is just not true (unless I decide I and patch contributors are all part of the Foundation, which I am also open to as I mentioned). And that makes me feel ... guilty? Of course, being such a PITA makes me feel guilty, too. Can you tell I was raised [gratuitous religious affiliation redacted]? > Finally, when more than one person is involved in the creation through the > filing of the bug report, the creation of the initial testcase etc, it is the > community (and therefore in my opinion the Foundation) that is the original > author and not the person who did the labor of putting it altogether in a > single file. Whether community = Foundation is way beyond my expertise here. I'm just a n00b. :) Lemme know what y'all think.
Comment 13•18 years ago
|
||
Let's not create a storm in a teacup; it's five lines of code. Given the way the code was created, either: "Original Developer: David Caldwell; Contributor: Michael Lipp" or the reverse would be entirely reasonable. Choose whichever one you think best reflects the truth of what happened. I don't think that it would be appropriate to give the Foundation as the original developer. People who are employed by the Foundation or Corporation do so because the Foundation is actually the copyright owner - but that is not the case for you. The attribution of Original Developer is a matter of copyright law, not a matter of community affiliation or otherwise. Hope that helps sort things out :-) Gerv
Comment 14•18 years ago
|
||
(In reply to comment #13) > Let's not create a storm in a teacup; it's five lines of code. Hopefully many more to come, though I am sure the volume in js/rhino will exceed that in js/tests. :) > Given the way the code was created, either: "Original Developer: David > Caldwell; Contributor: Michael Lipp" or the reverse would be entirely > reasonable. Choose whichever one you think best reflects the truth of what > happened. I think in the future I will list the person who submitted the original test case as the original developer unless it needs to be completely rewritten. I'll be a contributor (unless they write it using the test framework, in which case I will be nothing). Bob: I've got about six more of these in my directory; I haven't looked at them for a while so don't remember why they didn't get submitted in the first batch but I imagine I'll get to them soon. Thanks, everyone. :)
Comment 15•18 years ago
|
||
Adding target milestone of 1.6R6 based on the date this bug was resolved FIXED.
Target Milestone: --- → 1.6R6
You need to log in
before you can comment on or make changes to this bug.
Description
•