/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Warning: Cannot modify header information - headers already sent by (output started at /customers/4/c/9/iconara.net/httpd.www/blog/wp-content/advanced-cache.php:1) in /customers/4/c/9/iconara.net/httpd.www/blog/wp-includes/feed-rss2-comments.php on line 8 Comments on: XSL, plists and a bit of JSON http://blog.iconara.net/2006/12/13/xsl-and-plists/ Thu, 05 Jul 2012 13:41:39 +0000 hourly 1 http://wordpress.org/?v=3.0 By: Theo http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8656 Theo Thu, 05 Jul 2012 13:41:39 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8656 <p>You're probably right that it doesn't take care of nested dicts, just the top level dict. Thanks for the gists!</p> You’re probably right that it doesn’t take care of nested dicts, just the top level dict. Thanks for the gists!

]]>
By: elmimmo http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8643 elmimmo Fri, 01 Jun 2012 17:18:37 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8643 <p>Intermediate to JSON also seems to be broken. Does not correctly handle string|integer|real|date inside an array, and obviates boolean values.</p> <p>I put versions of the files with my fixes (which I think are final) at https://gist.github.com/2851115 and https://gist.github.com/2851536 (i hope that is fine with Theo; I've kept the © message since I just tweaked some lines and credited this website)</p> Intermediate to JSON also seems to be broken. Does not correctly handle string|integer|real|date inside an array, and obviates boolean values.

I put versions of the files with my fixes (which I think are final) at https://gist.github.com/2851115 and https://gist.github.com/2851536 (i hope that is fine with Theo; I’ve kept the © message since I just tweaked some lines and credited this website)

]]>
By: elmimmo http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8642 elmimmo Fri, 01 Jun 2012 10:45:30 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8642 <p>The stylesheet for transforming from plist format to intermediate format has a bug. dict elements other than /plist/dict are preceded by a key, and the stylesheet should be adding a name attribute to the object element with the value of that key.</p> <p>In other words</p> <p><pre><code><xsl:template match="dict"> <object> <xsl:apply-templates mode="dict"/> </object> </xsl:template></code></pre> <pre><code> <xsl:template match="dict" mode="dict"> <object> <xsl:apply-templates mode="dict"/> </object> </xsl:template> </code></pre></p> <p>should be:</p> <p><pre><code><xsl:template match="dict"> <object> <xsl:apply-templates mode="dict"/> </object> </xsl:template></code></pre> <pre><code> <xsl:template match="dict" mode="dict"> <xsl:variable name="name"> <xsl:value-of select="preceding-sibling::key[1]/text()"/> </xsl:variable></code></pre> <pre><code> <object name="{$name}"> <xsl:apply-templates mode="dict"/> </object> </xsl:template> </code></pre></p> <p>I think.</p> The stylesheet for transforming from plist format to intermediate format has a bug. dict elements other than /plist/dict are preceded by a key, and the stylesheet should be adding a name attribute to the object element with the value of that key.

In other words

<xsl:template match="dict">
    <object>
        <xsl:apply-templates mode="dict"/>
    </object>
</xsl:template>

<xsl:template match="dict" mode="dict">
    <object>
        <xsl:apply-templates mode="dict"/>
    </object>
</xsl:template>

should be:

<xsl:template match="dict">
    <object>
        <xsl:apply-templates mode="dict"/>
    </object>
</xsl:template>

<xsl:template match="dict" mode="dict">
    <xsl:variable name="name">
        <xsl:value-of select="preceding-sibling::key[1]/text()"/>
    </xsl:variable>

    <object name="{$name}">
        <xsl:apply-templates mode="dict"/>
    </object>
</xsl:template>

I think.

]]>
By: Theo http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8270 Theo Tue, 19 Oct 2010 06:58:09 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8270 <p>I've updated the links to the files and fixed some code formatting issues in the post. If the links to the files open directly in the browser, use view source to see the code (that's how Chrome treats them at least).</p> I’ve updated the links to the files and fixed some code formatting issues in the post. If the links to the files open directly in the browser, use view source to see the code (that’s how Chrome treats them at least).

]]>
By: Olaf Tietze http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8269 Olaf Tietze Mon, 18 Oct 2010 17:00:42 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8269 <p>Hi,</p> <p>Great article. Today I encountered the plist horrors Apple created with those keys. It seems they don't get how XML works.</p> <p>Would you be so kint to reupload your files or drop me a mail, as the links are no longer valid?</p> <p>Thanks a lot, regards,–</p> <p>Olaf</p> <p>(Hamburg/Germany)</p> Hi,

Great article. Today I encountered the plist horrors Apple created with those keys. It seems they don’t get how XML works.

Would you be so kint to reupload your files or drop me a mail, as the links are no longer valid?

Thanks a lot, regards,–

Olaf

(Hamburg/Germany)

]]>
By: elmimmo http://blog.iconara.net/2006/12/13/xsl-and-plists/comment-page-1/#comment-8225 elmimmo Sun, 25 Jul 2010 13:03:08 +0000 http://blog.iconara.net/2006/12/13/xsl-and-plists/#comment-8225 <p>Hi!</p> <p>Do you still have those files? Or else, do you know of other website that provides an XSLT stylesheet to parse Apple's PLIST files?</p> Hi!

Do you still have those files? Or else, do you know of other website that provides an XSLT stylesheet to parse Apple’s PLIST files?

]]>