Building, Part II

Editing XML is Hard… mText

In part one of Building I explained that we have a content management system that uses a layer of XML. But hand editing XML is a pain. HTML, generally a form of XML, is also kinda difficult to edit by hand, that’s why the blog world has adopted markup. A comon form of this sort of markup, which I use in this blog, is Textile. Generally this allows a user to use a simple text format that is translated to html. Miles Elam whipped out some Java and made mText, a markup that transforms to our SimpleDoc xml format.

mText Examples

mText uses brackets ([]) and other sudo-standard markup formatting to define elements. Currently there are some bugs in the code, but all of this does work, and translate to our simple doc format.


[myimage.jpg|Caption text]


[Link Text|]


[TLA|Three Letter Acronym]


! Section title
!! Subsection title
! Back to top Level

Orderd List

#! Title
# list item 1
# list item 2
# list item 3

Unordered List

*! Title
* list item 1
* list item 2
* list item 3

Here is an example of the xml generated by the above mText. This example was created using cocoon and mText. All of the sections that are siblings of articleinfo in this example where generated by the above mText and the mText java parser.

Why Not Textile

Textile and all the other markup systems translate the text markup to HTML, but we have a system that requires us to use a more symantic markup, Simple Doc XML. So Miles had to create mText. It’s a fine solution, the only problem is that he is the sole developer and it has become stale. Right now fixing the mText Java component is high on our GeekSpeak Web Davelopment needs.

Coccon and Rails

A few months ago I launched a tool built on Ruby on Rails that allows the Geeks of GeekSpeak to modifiy the GeekSpeak website. Currently it only allows the users to add shows; I made show editing first becuase that’s what I do the most. The long and the short of this beta version being up is that I do not have to edit xml documents all the time.

Here is a general breakdown of our system:

  • RubyOnRails app edits the content in the database
  • PostgreSQL database holds our content
  • Coccon on Tomcat using XSLT and mText renders html from the database contnet to create

Currently only the show pages (including homepage) is served from the database, but I am working on it.