found_drama

What else is this like?



    #recordXML (2).

    Spent about an hour or so working revisions to the DTD etc. tonight. Fixed a few (in retrospect) obvious errors and beefed up a few other things. Addressed several of the items w/r/t/ potential issues/complications with compilations. Made the bold decision to atomize it more rather than less, particularly w/r/t/ favoring the artist-track relationship over the artist-album relationship; I felt this places the proper emphasis on songs as atomized units while allowing the flexibility w/in the DTD for compilations, mixes, etc. to fit more easily into the spec. Thus do I open it up to review…

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <!ELEMENT collection (record+)>

      <!ELEMENT record (album, tracklisting, original, label?, other?)>

        <!ELEMENT album (title, mixedby?)>

          <!ATTLIST album released NMTOKEN #IMPLIED

                        compilation ( false | true ) #REQUIRED

          >

          <!ELEMENT title (#PCDATA)>

          <!ELEMENT mixedby (#PCDATA)>

        <!ELEMENT tracklisting (track+)>

          <!ELEMENT track (artist?, trackname, composer?)>

            <!ATTLIST track genre CDATA #IMPLIED

                            tracknum NMTOKEN #IMPLIED

                            bpm NMTOKEN #IMPLIED

            >

            <!ELEMENT artist (#PCDATA)>

            <!ELEMENT trackname (#PCDATA)>

            <!ELEMENT composer (#PCDATA)>

        <!ELEMENT original (format)>

          <!ATTLIST original condition ( 1 | 2 | 3 | 4 | 5 ) #REQUIRED>

          <!ELEMENT format (#PCDATA)>

        <!ELEMENT label (#PCDATA)>

        <!ELEMENT other (grouping?, comments?, review*)>

          <!ELEMENT grouping (#PCDATA)>

          <!ELEMENT comments (#PCDATA)>

          <!ELEMENT review (#PCDATA)>

            <!ATTLIST review author CDATA #IMPLIED

                           source CDATA #IMPLIED

            >

    EXAMPLE! Right-click, save as… example.xml

    Currently Playing: Depeche Mode “Free Love” (bootleg Deep Dish remix — super-sick!!)


    <collection>

      <record>

        <album compilation=”false”><title>(unknown)</title></album>

        <tracklisting><track genre=”House”><artist>Depeche Mode</artist><trackname>Free Love (Deep Dish remix)</trackname></track></tracklisting>

        <original condition=”5″><format>MP3/CBR@192</format></original>

      </record>
    </collection>


    2 Responses to “recordXML (2).”


    1. found_drama » Blog Archive » iTunes2MySQL2…:

      [...] As this project expands and meets head-on with this neat little nuance of Apple’s “plist” ish, I find myself at a fun little x-roads. To start with, there’s a whole lot of MySQL and PHP being re-learned at the moment. The funny part is, being an iTunes user, so much of my music collection is already quite well coded, accessible, and searchable. Why bother with creating a database version of it? Or re-inventing an XML standard to mark it up? Or anything along those lines? [...]


    2. found_drama » Blog Archive » intake forms.:

      [...] Williams & Lane’s WDA w/ PHP & MySQL book. Again. So soon. Brushing up on chapter 3 and appendix C. Taking a certain side project to its natural next level. [...]


    Leave a Comment:

    [ submit comment ]