From 796c806c8ea5a6b3f6077ddfeb4e174ee7dec92d Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Tue, 14 Jul 2015 17:04:45 +0000 Subject: [PATCH] Use up to date DTD git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38789 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Source/NSPropertyList.m | 18 ++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 59d250161..663451d07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-07-14 Richard Frith-Macdonald + + * Source/NSPropertyList.m: Write xml document headers referring to + the current location of Apple's property list dtd for compatibility + with software expecting to validate using that dtd. + Stefan Bidigaray pointed out that the heading we currently write is + very out of date. + 2015-07-09 Richard Frith-Macdonald * Source/NSDebug.m: List memory allocation statistics in alphabetical diff --git a/Source/NSPropertyList.m b/Source/NSPropertyList.m index 390afb1c9..9c3a05c91 100644 --- a/Source/NSPropertyList.m +++ b/Source/NSPropertyList.m @@ -53,6 +53,12 @@ static id boolN = nil; static id boolY = nil; +static const char *prefix = + "\n" + "\n" + "\n"; + @class GSSloppyXMLParser; #define inrange(ch,min,max) ((ch)>=(min) && (ch)<=(max)) @@ -2390,12 +2396,6 @@ static BOOL classInitialized = NO; if (aFormat == NSPropertyListXMLFormat_v1_0) { - const char *prefix = - "\n\n" - "\n"; - [dest appendBytes: prefix length: strlen(prefix)]; OAppend(aPropertyList, loc, 0, step > 3 ? 3 : step, aFormat, dest); [dest appendBytes: "" length: 8]; @@ -2459,12 +2459,6 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml, if (style == NSPropertyListXMLFormat_v1_0) { - const char *prefix = - "\n\n" - "\n"; - [dest appendBytes: prefix length: strlen(prefix)]; OAppend(obj, loc, 0, step > 3 ? 3 : step, style, dest); [dest appendBytes: "" length: 8];