Fwd: NSXMLDocument

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Fwd: NSXMLDocument

by Richard Frith-Macdonald-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Begin forwarded message:

> From: Richard Frith-Macdonald <richard@...>
> Date: 13 February 2009 15:17:08 GMT
> To: hns <hns@...>
> Subject: Re: NSXMLDocument
>
>
> On 10 Feb 2009, at 19:00, hns wrote:
>
>>> I have some code I wrote late last year that I haven't committed to
>>> the base libaray ... just the headers and largely non-functional
>>> skeletons of the implementation, but even so that's a little more
>>> advanced than currently in mySTEP.
>>
>> The latest state is that simple XML files (without DTD, Namespaces  
>> and
>> Entities) are parsed. Code (pure OBJ-C version) is not yet in
>>
>> http://www.quantum-step.com/download/sources/
>>
>> but will be with the next release (in the next days).
>>
>> But I have seen that the GNUstep implementation shall become a  
>> wrapper
>> for libxml2 so my code can't be used anyway (since it does not relate
>> to libxml2).
>
> There's no reason why there can't be two implementations available  
> in base ... we already have two versions of NSXMLParser ... one  
> using libxml2 which is fairly strict about getting valid XML, the  
> other writing in pure objective-c and tolerant of the invalid XML  
> produced by some of the Apple tools.
>
>



_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Nicola Pero-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> There's no reason why there can't be two implementations available  
>> in base ... we already have two versions of NSXMLParser ... one  
>> using libxml2 which is fairly strict about getting valid XML, the  
>> other writing in pure objective-c and tolerant of the invalid XML  
>> produced by some of the Apple tools.

If Apple's own implementation is a wrapper around libxml2, how do they  
manage to parse this invalid XML that their own tools produce ? ;-)

Maybe they set some permissive flags in libxml2 ?

Thanks


_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Richard Frith-Macdonald-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 13 Feb 2009, at 15:29, Nicola Pero wrote:

>>> There's no reason why there can't be two implementations available  
>>> in base ... we already have two versions of NSXMLParser ... one  
>>> using libxml2 which is fairly strict about getting valid XML, the  
>>> other writing in pure objective-c and tolerant of the invalid XML  
>>> produced by some of the Apple tools.
>
> If Apple's own implementation is a wrapper around libxml2, how do  
> they manage to parse this invalid XML that their own tools  
> produce ? ;-)

Maybe they don't manage to parse their own stuff with it (just like we  
don't).  At FOSDEM, I think Marcus told me they use a special custom-
written parser in 'C' for handling 'XML' property lists, and this  
would obviously allow them to accept illegal characters there.

Also, perhaps they really don't wrap libxml2 ... though the new API  
they provide looks *very* like the libxml2 feature set, and I've read  
on the web (though obviously that's not to be trusted) that they wrap  
libxml2.

> Maybe they set some permissive flags in libxml2 ?

I'm pretty certain that's not the case ... I looked long and hard for  
such an option (to permit characters like ESC, defined as illegal/
forbidden in the xml standards), and all I found was various threads  
saying that it was not and would not be done.  You can't put ESC in  
XML even using the &#NN; notation.


_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Parent Message unknown Re: NSXMLDocument

by hns@computer.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 13 Feb., 16:54, Richard Frith-Macdonald
<rich...@...> wrote:

> On 13 Feb 2009, at 15:29, Nicola Pero wrote:
>
> >>> There's no reason why there can't be two implementations available  
> >>> in base ... we already have two versions of NSXMLParser ... one  
> >>> using libxml2 which is fairly strict about getting valid XML, the  
> >>> other writing in pure objective-c and tolerant of the invalid XML  
> >>> produced by some of the Apple tools.
>
> > If Apple's own implementation is a wrapper around libxml2, how do  
> > they manage to parse this invalid XML that their own tools  
> > produce ? ;-)
>
> Maybe they don't manage to parse their own stuff with it (just like we  
> don't).  At FOSDEM, I think Marcus told me they use a special custom-
> written parser in 'C' for handling 'XML' property lists, and this  
> would obviously allow them to accept illegal characters there.

Yes, that is correct. They use CFPropertyList which is even part of
CFLite, i.e. open source (at least the binary plists).

http://developer.apple.com/DOCUMENTATION/CoreFoundation/Reference/CFPropertyListRef/Reference/reference.html

http://www.gnu-darwin.org/www001/src/DarwinSourceArchive/expanded/CF/CF-299/Parsing.subproj/CFBinaryPList.c


>
> Also, perhaps they really don't wrap libxml2 ... though the new API  
> they provide looks *very* like the libxml2 feature set, and I've read  
> on the web (though obviously that's not to be trusted) that they wrap  
> libxml2.
>
> > Maybe they set some permissive flags in libxml2 ?
>
> I'm pretty certain that's not the case ... I looked long and hard for  
> such an option (to permit characters like ESC, defined as illegal/
> forbidden in the xml standards), and all I found was various threads  
> saying that it was not and would not be done.  You can't put ESC in  
> XML even using the &#NN; notation.

_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep