bugGNUstep - Bugs: bug #32153, NSXMLParser does not correctly...

 
 

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

bug #32153: NSXMLParser does not correctly handle inline DTD

Submitted by:  Wolfgang Lux <wlux>
Submitted on:  Mon 17 Jan 2011 02:45:17 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 19 Jan 2011 09:04:53 AM UTC, comment #2:

Hummm. I did an svn up and (almost) instantly a revert, as you seem to have introduced a new major bug with your changes: My user defaults are trashed in a seemingly random way (some preferences are still correct, but others are lost). Comparing ~/GNUstep/Defaults/.GNUstepDefaults with the most recent backup, I noticed that the file contains a lot of additional white space now. It looks as if the XML property list parser is inserting white space at the beginning of dictionary keys and items even though it isn't present in the file.

Wolfgang Lux <wlux>
Tue 18 Jan 2011 08:58:14 PM UTC, comment #1:

Thanks ... I fixed that in svn.

Richard Frith-Macdonald <CaS>
Project Member
Mon 17 Jan 2011 02:45:17 PM UTC, original submission:

The new NSXMLParser implementation sends tags in inline DTDs as start tags to the parser delegate. This breaks existing parsers, which may receive unexpected (for them) tags.

Test case attach below. Compile parserTest.m with
gcc `gnustep-config --objc-flags` parserTest.m -o parserTest `gnustep-config --base-libs`
then run it with the attached sample XML file
./parserTest ct.xml

The output begins with
<!ATTLIST>
<!ELEMENT>
<!ATTLIST>
<!ELEMENT>
<!ELEMENT>
<cTree>
<function>
but should really start with the cTree tag. This is the case for both Apple's implementation and the libxml based implementation of GNUstep's NSXMLParser.

For reference, the expected output (as computed by running the sample on OS X) is in file ct.out.

Wolfgang Lux <wlux>

 

Attached Files
file #22425:  parserTest.m added by wlux (2KiB - application/octet-stream)
file #22426:  ct.xml added by wlux (632B - application/xml)
file #22427:  ct.out added by wlux (281B - 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 wlux (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Jan 2011 08:58:14 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 17 Jan 2011 02:45:17 PM UTCwluxAttached File-=>Added parserTest.m, #22425
      Attached File-=>Added ct.xml, #22426
      Attached File-=>Added ct.out, #22427

    Back to the top


    Powered by Savane 3.1-cleanup1