Skip to content

Changes in XML schema 2.0

Debatekeeper version 1.0 uses a new XML schema for debate format files.

In app version 1.0, I overhauled the XML schema for debate format files.

Debate format authors should rewrite their files in the 2.0 format. To make this easier, here is a Python script that will do that for you.  (You need to have Python installed in order to run it.  If you don’t have or want Python, it’s not too much of a task to convert it manually.)  Files using the 1.1 format will remain compatible with the app for a while, but not forever, and I really encourage authors to convert their files to the new format.

If you have any questions, please get in touch by e-mail or on Twitter.

What’s changed

  1. Period types have been unified into a few built-in period types.  Most debate formats won’t need more than the built-in types, but those that do can define custom period types.
  2. <resource> elements are obsolete.
  3. Element and attribute names are now hyphenated rather then one-worded.

Why the change?

Basically, I realised that the original schema wasn’t going to hold its functionality much longer, so decided to shift to a better one sooner rather than later.

Having period types specified by speech didn’t really make sense.  Most speeches go through similar stages (POIs allowed, warning bells), just with different bell times, so they should share period types.  The old schema had a clunky <resource> element that it used to share periods and bells, which could be confusing (both to use and code). It makes a lot more sense for period types to be global, and for each speech just to specify bell times.

Furthermore, it made little sense for debate formats to specify background colours, given that they’re not actually part of the format—they’re just a user convenience.  Eventually, I intend to make background colours customisable, which requires all period types to have global scope.  For now, they use a “default background colour” (default-bgcolor), which will become a default for users when customisability is implemented.

Also, though case conventions for XML seem to vary depending on who you ask, stringing multiple words into a single word was probably a bad idea, so I decided to follow the hyphenation convention used by most W3C specifications.

Lastly, the old schema used attributes for things that really should have been in elements.  So I took the opportunity to change that too.

Why you should rewrite your file in the new format

Three reasons:

  1. The new built-in period types allow for period types to be more consistent between debate styles, even allowing for user customisability.
  2. If and when I do an iOS version and/or Windows Phone version, it will not support schema 1.0 files.
  3. I will eventually drop support for schema 1.0 files from the Android version.
Advertisements
No comments yet

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: