[microformats-discuss] XHTML Property Lists (Mac OS X)

Ryan King ryan at technorati.com
Mon Sep 26 23:57:10 PDT 2005

On Sep 23, 2005, at 8:16 PM, Dr.Ernie Prabhakar wrote:

> Hi all,
> Many of you, I'm sure, know that Mac OS X uses Property Lists for  
> generic data storage, often encoded in XML:
> http://developer.apple.com/documentation/Cocoa/Conceptual/ 
> PropertyLists/Concepts/XMLPListsConcept.html
> As I think has been discussed before, these seem like a natural  
> application for XOXO.  However, I don't believe anyone has actually  
> worked out a mapping.  Here's my first cut at an XHTML equivalent  
> of the XML Property List formant in Mac OS X:

This is an interesting exercise.

> <dl class="xoxo plist">
>    <dt>NSDictionary</dt>
>    <dd class="xs:string">Entries</dd>
>    <dt>Key</dt>
>    <dd class="xs:string">Value</dd>
>    <dt>Array</dt>
>    <dd>
>      <ol>
>        <li class="xs:string">Item #1</li>
>        <li class="xs:string">Item #2</li>
>      </ol>
>    </dd>
>    <dt>NSString</dt>
>    <dd class="xs:string">abcd</dd>
>    <dt>NSNumber (integer)</dt>
>    <dd class="xs:integer">123</dd>
>    <dt>NSNumber (floating-point)</dt>
>    <dd class="xs:float">123.456</dd>
>    <dt>NSDate</dt>
>    <dd class="xs:date">1987-12-03</dd>
>    <dt>NSNumber (BOOL YES)</dt>
>    <dd class="xs:boolean">true</dd>
>    <dt>NSNumber (BOOL NO)</dt>
>    <dd class="xs:boolean">false</dd>
>    <dt>NSData</dt>
>    <dd class="xs:base64Binary">sdcfo2JTiXE=</dd>
> </dl>
> I realize that's a somewhat squirrely use of XML datatypes, but it  
> seemed appropriate.  Would it be better (or worse) if I dropped the  
> 'xs' prefix?

I would suspect that you could deal without them. Integer, string and  
base64Binary are not likely to collide; float and date probably a bit  
more likely. Still, doesn't seem to be a huge problem, especially  
since 'date' would probably mean the same thing  in the case of a  

Also, as a sidenote, some of the properites could be displayed in a  
more HTML-native way- for example base64Binary could be put in an  
<img>, in the case that the data is an image. Also, the datetime- 
design-pattern (http://microformats.org/wiki/datetime-design-pattern)  
could be used for xs:date, once we figure out the design pattern. :D

> I'm also attaching an HTML table showing the mapping -- apologies  
> if that violates list etiquette:

In general, uploading somewhere is prefered, but this is ok.

> <plist.html>
> Please let me know if there's a better way to do this (or ask about  
> this).

I have a question: what would you use this for? What's the point?  
What's the problem we're trying to solve.

If this is just an intellectual exercise, fine, but let's just be  
clear on that.


More information about the microformats-discuss mailing list