bugGNUstep - Bugs: bug #36976, NSXML : trailing newlines in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #36976: NSXML : trailing newlines in elements

Submitted by:  Riccardo Mottola <rmottola>
Submitted on:  Fri 27 Jul 2012 12:41:59 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sat 28 Jul 2012 10:55:56 PM UTC, comment #6:

Being comaptible to Apple here, is surely the way to go. I don't understand why they would use unlimited strings as description, but if they do so, we have to follow .-(

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Fri 27 Jul 2012 06:03:14 PM UTC, comment #5:

Thanks ... it seems OSX simply uses the string value of a node as its description ... so I changed the gnustep code to do the same.

Richard Frith-Macdonald <CaS>
Project Member
Fri 27 Jul 2012 05:23:34 PM UTC, comment #4:

Attached!

(file #26274)

Riccardo Mottola <rmottola>
Project Member
Fri 27 Jul 2012 04:31:11 PM UTC, comment #3:

Please can you post your testcaseso I can look at it on OSX.
The reason is ... it's not clear to me that there was a bug or that the fix is correct/complete ...

The fix Fred did was to change the -description method ... which is supposed to produce debug output. It certainly seems inconsistent with the -description implementation of other classes for NSXMLNode to include a newline, but it can't actually be a bug as such since there's no generally defined format for debug output.

But, generally we treat it as a bug (ie something to be changed) if an object's -description method produces different output using GNUstep than it does on OSX ... so to know what we should be producing, we need to run the same code on OSX and see.

Richard Frith-Macdonald <CaS>
Project Member
Fri 27 Jul 2012 04:19:00 PM UTC, comment #2:

Wow, I just completed a small demo program, but you fixed it. Anyway, the test program shows that it is fixed for me.

Riccardo Mottola <rmottola>
Project Member
Fri 27 Jul 2012 03:37:18 PM UTC, comment #1:

Somehow a newline made it into the description method of NSXML. I removed this and hope that the problem is gone now.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Fri 27 Jul 2012 12:41:59 PM UTC, original submission:

Given the XML having:
<?xml version="1.0" encoding="utf-8"?><env:Envelope xmlns:env="http://italcogim/stampatore/envelope">

the corresponding namespace extracted with:
NSLog(@"namespace |%@|", [[rootElement namespaces] objectAtIndex:0]);

Will print:
2012-07-27 12:21:25.139 GDFTester[18875] namespace |<NSXMLNode env 4>xmlns:env="http://italcogim/stampatore/envelope"
|

showing a trailing new line. This affects also node names and other elements. For example, the printout of the children yields:

"<NSXMLElement Priorita 2><Priorita>Normale</Priorita>
",

Tthere is an extra newline after the </Priorita> tag

Riccardo Mottola <rmottola>
Project Member

 

Attached Files
file #26274:  main.m added by rmottola (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by rmottola (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Jul 2012 05:23:34 PM UTCrmottolaAttached File-=>Added main.m, #26274
    Fri 27 Jul 2012 04:19:00 PM UTCrmottolaStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Fri 27 Jul 2012 03:37:18 PM UTCFredKieferStatusNone=>Ready For Test
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1