[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML property-lists problem
From: |
richard |
Subject: |
Re: XML property-lists problem |
Date: |
Mon, 25 Sep 2000 12:03:35 +0100 |
On Mon, 25 Sep 2000 10:41:21 +0200, helge.hess@skyrix.com wrote:
> richard@brainstorm.co.uk wrote:
> > Encoding an escape as  doesn't work for me - during parsing, libxml
> > automatically translates that to an escape and then barfs because an escape
> > isn't legal. Perhaps I'm missing something in libxml, or perhaps that's the
> > way the xml standard works - I'm not enough of an sgml expert to know.
>
> Did you try to use a CDATA section ? I think that is the way to go for
> XML-invalid strings.
> Another way I can imagine to work is using entities, eg &escape;.
The MacOS-X property-list DTD (0.9) says -
<!ELEMENT string #PCDATA>
and doesn't define any entities to escape control characters.
> So for encoding NSString's containing whitespace you also need to use
> either CDATA or entities.
Thanks - but I checked the annotated CML spec at www.xml.com and found that
control characters (other than tab, nl, and cr) are not legal even in CDATA -
so I guess that we have to come up with entities to do the job, or use some
other mechanism for escaping control characters in strings in property lists.
I think I'll wait until I can get hold of a copy of MacOS-X and test to see
what it actually does - then try to make GNUstep compatible with that. Of
course, it may be that the MacOS-X code doesn't handle strings containing
control characters, in which case I'll tjhink again.