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];