I’m going to change the file format and break the DTD for Bookcase 0.7. Since I’m expanding Bookcase to cover DVD or CD collections, I don’t want to write them into <book> elements in the XML data file. Rather than using a different element name for each collection type, every book, DVD, CD, or whatever will be in an <entry> element. Then, the collection type will be an attribute in the <collection> element containing all the <entry>s.
And since I’m making that tweak, I’m going to go the full hog and change <attribute> to <field>. I don’t remember why I called them attributes in the first place, and I was even confusing myself in the code, since I had <attribute> elements which had attributes themselves, in the XML sense.
Finally, based on a suggestion from Joseph Reagle, and explained in his paper Eskimo Snow and Scottish Rain*: Legal Considerations of Schema Design, I’m changing the Boolean fields so that they don’t have a
default implicit semantic for an absent element. That means that rather than having <read/>, I’ll have <read>true</read>.
I also thought about using <value name="author"> rather than <author> which would allow me to write a definitive DTD, which would apply even if the user added a custom field, but I decided not to. Following the DTD is not that big of a deal, it would unneccesarily increase the file size, and just plain looks ugly to me.
These changes mean that anyone with custom XSL stylesheets or exporters, like Joseph’s jpilot converter, will break on files saved by Bookcase 0.7 and newer. I don’t think that’s a big deal – Joseph is a very clever fellow and these are relatively minor changes – and besides, It’s only version 0.7, not even 1.0 yet! Bookcase is hobby software, after all… 🙂