<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on:  Does anyone know why the Mac OSX property list (pflist) file format is such a bastardization of XML?</title>
	<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML/</link>
	<description>Comments on Ask MetaFilter post Does anyone know why the Mac OSX property list (pflist) file format is such a bastardization of XML?</description>
	<pubDate>Wed, 29 Dec 2004 12:40:17 -0800</pubDate>
	<lastBuildDate>Wed, 29 Dec 2004 12:40:17 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question:  Does anyone know why the Mac OSX property list (pflist) file format is such a bastardization of XML?</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML</link>	
		<description>Does anyone know why the Mac OSX &lt;a href=&quot;http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/PListKeys.html&quot;&gt;property list&lt;/a&gt; (pflist) file format is such a bastardization of XML?&lt;br&gt;
&lt;br&gt;
It looks like XML, except it doesn&apos;t form a proper tree.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2004:site.13440</guid>
		<pubDate>Wed, 29 Dec 2004 12:36:27 -0800</pubDate>
		<dc:creator>robinw</dc:creator>
		
			<category>osx</category>
		
			<category>xml</category>
		
			<category>pflist</category>
		
			<category>mac</category>
		
			<category>propertylist</category>
		
	</item> <item>
		<title>By: andrew cooke</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232724</link>	
		<description>eh?  it is standard xml.  what do you mean?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232724</guid>
		<pubDate>Wed, 29 Dec 2004 12:40:17 -0800</pubDate>
		<dc:creator>andrew cooke</dc:creator>
	</item><item>
		<title>By: andrew cooke</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232728</link>	
		<description>(as long as it nests - every opened element closes and no two elements &quot;overlap&quot; - then it is a tree.  trees don&apos;t have to have all branches &quot;teh same&quot; in some way)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232728</guid>
		<pubDate>Wed, 29 Dec 2004 12:45:52 -0800</pubDate>
		<dc:creator>andrew cooke</dc:creator>
	</item><item>
		<title>By: nicwolff</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232735</link>	
		<description>It&apos;s valid XML, but the DTD is general to key-value &quot;property lists&quot; rather than to the particular properties being listed. They&apos;re meant to be read to and from data structure with the &lt;a href=&quot;http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Tasks/XMLPListsTask.html&quot;&gt;Cocoa property-list API&lt;/a&gt;, not manipulated with XPath.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232735</guid>
		<pubDate>Wed, 29 Dec 2004 12:52:36 -0800</pubDate>
		<dc:creator>nicwolff</dc:creator>
	</item><item>
		<title>By: xil</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232736</link>	
		<description>That link doesn&apos;t actually describe the format of a generic plist, it just gives descriptions of the keys in a specific plist. A better example of the XML is &lt;a href=&quot;http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Concepts/XMLPListsConcept.html&quot;&gt;here&lt;/a&gt;. Also note the &lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;DTD&lt;/a&gt; which describes the format.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232736</guid>
		<pubDate>Wed, 29 Dec 2004 12:52:57 -0800</pubDate>
		<dc:creator>xil</dc:creator>
	</item><item>
		<title>By: smackfu</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232737</link>	
		<description>Good question.  It does honestly look like something someone would design right after discovering XML, before they knew better.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232737</guid>
		<pubDate>Wed, 29 Dec 2004 12:59:07 -0800</pubDate>
		<dc:creator>smackfu</dc:creator>
	</item><item>
		<title>By: robinw</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232739</link>	
		<description>Okay, I apologize.  It is a valid document in the sense that it validates, but it isn&apos;t valid in the sense that it&apos;s not logically arranged.  For example, from &lt;a href=&quot;http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Concepts/XMLPListsConcept.html&quot;&gt;xil&apos;s link&lt;/a&gt;, you can see that a particular key/value pair is not separated by a sub-tree.  The only way to find out when the current key/value pair ends is by the next node having another key.&lt;br&gt;
&lt;br&gt;
Why go to so much work making it look like XML, only to arrange it completely illogically?  They could have added one simple wrapper node to each key/value pair and it would have been perfect.&lt;br&gt;
&lt;br&gt;
It&apos;s not easily parseable by man, nor machine.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232739</guid>
		<pubDate>Wed, 29 Dec 2004 13:01:29 -0800</pubDate>
		<dc:creator>robinw</dc:creator>
	</item><item>
		<title>By: sbutler</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232742</link>	
		<description>I know some people are pissed that plist files rely on the order of the elements, not just that they exist. For example, an entry in a dictionary is:&lt;br&gt;
&lt;br&gt;
&lt;blockquote&gt;&amp;lt;key&amp;gt;some key&amp;lt;/key&amp;gt;&lt;br&gt;
&amp;lt;string&amp;gt;some value&amp;lt;/key&amp;gt;&lt;/blockquote&gt;&lt;br&gt;
instead of something more verbose, like&lt;br&gt;
&lt;br&gt;
&lt;blockquote&gt;&amp;lt;entry&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;some key&amp;lt;/key&amp;gt;&lt;br&gt;
&amp;lt;string&amp;gt;some value&amp;lt;/key&amp;gt;&lt;br&gt;
&amp;lt;/entry&amp;gt;&lt;/blockquote&gt;&lt;br&gt;
But I don&apos;t remember anything in the XML spec that says sibling order can be ignored -- so Apple is completely within its right. I rather like the more compact way they did it.&lt;br&gt;
&lt;br&gt;
incidentally, Sun went the verbose route with Servlets/JSP and the deployment descriptor. Try typing one of those out by hand sometime: it truly sucks.&lt;br&gt;
&lt;br&gt;
(on preview: what robinw said, but I disagree. Seems like a perfectly valid design choice to me)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232742</guid>
		<pubDate>Wed, 29 Dec 2004 13:04:05 -0800</pubDate>
		<dc:creator>sbutler</dc:creator>
	</item><item>
		<title>By: sbutler</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232747</link>	
		<description>&lt;small&gt;ermm.. foiled again by copy and paste! please excuse my obviously invalid XML&lt;/small&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232747</guid>
		<pubDate>Wed, 29 Dec 2004 13:05:36 -0800</pubDate>
		<dc:creator>sbutler</dc:creator>
	</item><item>
		<title>By: andrew cooke</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232750</link>	
		<description>oh, ok.&lt;br&gt;
you could probably write an xslt transform that collects together key/value pairs and inserts an extra element round them.  then filter your data through that.  or parse with a stream interface (sax), which makes changing state in this way fairly simple.&lt;br&gt;
imho, this is a problem because tools don&apos;t use the dtd sufficiently.  if you look at the &lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;dtd&lt;/a&gt;, the structure is pretty obvious (it&apos;s an elegant recursive definition, just like you&apos;d write in a functional language).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232750</guid>
		<pubDate>Wed, 29 Dec 2004 13:13:36 -0800</pubDate>
		<dc:creator>andrew cooke</dc:creator>
	</item><item>
		<title>By: andrew cooke</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232752</link>	
		<description>(in fact, you might find that a fancy xml parser for (extended) haskell generates data structures from that dtd just like you&apos;d write yourself.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232752</guid>
		<pubDate>Wed, 29 Dec 2004 13:15:59 -0800</pubDate>
		<dc:creator>andrew cooke</dc:creator>
	</item><item>
		<title>By: andrew cooke</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232755</link>	
		<description>generates data structures -&amp;gt; generates types and code (to generate typed structures from the xml)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232755</guid>
		<pubDate>Wed, 29 Dec 2004 13:17:30 -0800</pubDate>
		<dc:creator>andrew cooke</dc:creator>
	</item><item>
		<title>By: nicwolff</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232762</link>	
		<description>&lt;i&gt;The only way to find out when the current key/value pair ends is by the next node having another key.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Huh? It&apos;s a pair. &lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;&amp;lt;!ELEMENT dict (key, %plistObject;)*&amp;gt;&lt;/a&gt;. Man, or machine, can use XSL&apos;s following-sibling selector to &lt;a href=&quot;http://www.xmldatabases.org/WK/blog/1086?t=item&quot;&gt;easily parse and transform plists&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232762</guid>
		<pubDate>Wed, 29 Dec 2004 13:26:44 -0800</pubDate>
		<dc:creator>nicwolff</dc:creator>
	</item><item>
		<title>By: robinw</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232766</link>	
		<description>Touch&#233;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232766</guid>
		<pubDate>Wed, 29 Dec 2004 13:35:42 -0800</pubDate>
		<dc:creator>robinw</dc:creator>
	</item><item>
		<title>By: nicwolff</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232792</link>	
		<description>Not to snark, but I knew little about XSL and DTDs and nothing about XSL before I &lt;a href=&quot;plist xml&quot;&gt;googled &quot;plist xml&quot;&lt;/a&gt; after reading your question. So, I thank you for the opportunity to educate myself but my clients hate us both now for the work time lost...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232792</guid>
		<pubDate>Wed, 29 Dec 2004 14:04:51 -0800</pubDate>
		<dc:creator>nicwolff</dc:creator>
	</item><item>
		<title>By: nicwolff</title>
		<link>http://ask.metafilter.com/13440/Does-anyone-know-why-the-Mac-OSX-property-list-pflist-file-format-is-such-a-bastardization-of-XML#232795</link>	
		<description>Oh, wait, you thought it was &quot;pflist&quot; - it&apos;s &quot;plist&quot; - never mind, you wouldn&apos;t have found it.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.13440-232795</guid>
		<pubDate>Wed, 29 Dec 2004 14:05:55 -0800</pubDate>
		<dc:creator>nicwolff</dc:creator>
	</item>
	</channel>
</rss>
