recordXML.
¶ by Rob FrieselNeeding a new side-project, and with the flurry of vinyl-to-MP3 transfers going on around this joint, I decided to start up my own little XML standard for marking up the records. After about 20 minutes, here’s what we’ve got:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT collection (record+)>
<!ELEMENT record (artist, album, original, tracklisting, condition?)>
<!ELEMENT artist (#PCDATA)>
<!ELEMENT album (#PCDATA)>
<!ATTLIST album released NMTOKEN #IMPLIED>
<!ELEMENT original (format)>
<!ATTLIST original condition ( 1 | 2 | 3 | 4 | 5 ) #REQUIRED>
<!ELEMENT format (#PCDATA)>
<!ELEMENT tracklisting (track+)>
<!ELEMENT track (#PCDATA)>
To do…:
- Improve support for compilations (move ‘artist’ to a child element of track?)
- Better define condition element (function isn’t obvious in the DTD ‘as is’)
- Improve ‘released’ attribute to support exact dates where applicable (while avoiding simple “#CDATA” (non-)mark-up)
- Increase robustness of the tracklisting element
- Create attribute definitions for format element
- Better spec out required vs. optional elements
- Fill in the blanks (e.g., genre, BPMs, mood, comments, etc.)
Leave a Reply