Introducing AtomiXXE

Revision History
Revision 0.12005-11-28

Initial draft.


Table of Contents

What is it?
How do I get it?
How do I use it?
Caveats
Pretty Lights

AtomiXXE is a configuration for authoring Atom files in the XMLmind XML Editor (XXE). Atom is an XML application for syndicating lists of related news items. I'm not sure anyone really edits Atom by hand, but I've decided that it might be fun. I think that Atom may be a good format for little journal-style postings, or quick news updates. Right now, people usually edit such things using a blog interface, but I rather like to touch my documents directly. Atom is a clean format, and I think it will fill that niche nicely. If you would also like to try hand-authoring Atom, then by all means, read on!

I'm providing the basics here: installation instructions, simple usage instructions, and then finally some warnings.

AtomiXXE is an XXE configuration, so you're going to have to install XXE. There is a section of the User's Guide under their Documentation section that covers XXE installation. Once you've done that, simply download the latest tarball of the AtomiXXE configuration and extract that tarball to your XXE addon directory. For example, this is .xxe/addon/ in your home directory on Unix-like systems, and Application Data\XMLmind\XMLeditor\addon\ in your home directory on Windows systems. Once you have extracted the configuration, simply restart XXE for the configuration to take effect.

Alternatively, if you're interested in hacking on AtomiXXE or want to see the raw code (although it's not much different from the distribution above, really), the (Subversion) repository URL for the trunk is svn://infinitesque.net/AtomiXXE/trunk. For example, to check it out using the svn command-line client, you might use the following command.

$ svn checkout svn://infinitesque.net/AtomiXXE/trunk AtomiXXE
    

AtomiXXE currently has essentially two useful features. First, it provides the necessary wiring to add Atom content to an Atom document using the XXE interface. To learn how to use XXE in general, I recommend the tutorials found in the XXE User's Guide, found in the XXE Core documentation. The second feature is management of Atom dates. The Atom language has two elements which use the same date format: updated and published. Getting these date formats correct isn't really trivial, so I've added support for generating the contents of these elements. Select either of those elements, then choose AtomUpdate date element. This will set the contents of the selected element to the Atom-conforming date-time value for the current date and time.

Granted, that's pretty rudimentary; there are a number of other things that I could support as well. With XXE, I could automatically set the date and time of empty updated or published elements when you save files or when you create those elements. It's also possible to do more sophisticated management of times, such as automatically ordering your entries based upon their timestamp. Let me know if you'd like to see any of these features (or others, of course).

AtomiXXE is a configuration which works with the Standard (i.e. gratis) version of XXE. It includes an Atom DTD, and it is not namespace aware. "An Atom DTD?" you note, "that won't even be able to support interleave!" It's true; the Atom DTD I put together is quite a hack, and actually validates a significantly different set of documents from "actual" Atom. "Won't that make it worthless?" I don't think so; with support from the user interface and XXE templates, I think it should be easy to write valid Atom documents. When opening Atom documents, if those documents only specify default namespaces on the name change boundary (that is, they don't use namespace prefixes and they use a minimum number of namespace declarations), then they should validate under the DTD.

Your mileage may vary, of course. For example, under this DTD, XXE will happily let you delete all the children but one (of your choice) within an entry, and this is clearly not allowed by the Atom specification. Also, as with the date support described above, we need special support for data types. Somewhere in my TODO list is a general Java UI for building URIs; if/when that gets done I should be able to incorporate it into this configuration. I'm also thinking about coming up with a version of the configuration that would use the Relax NG schema and which would be namespace aware. This configuration, however, would only work under XXE Professional.

And now, I give you the obligatory screen shot:

This corresponds to the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Today's News</title>

  <author>
    <name>John L. Clark</name>
  </author>

  <id>tag:jlc6@po.cwru.edu,2005-11-29:news</id>

  <updated>2005-11-29T20:37:41-08:00</updated>

  <entry>
    <title>Finished AtomiXXE 0.1</title>

    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've
    reached a point where I believe that AtomiXXE is minimally useable; I'm
    going to start telling people about it now.</p><p>Today I updated the
    stylesheets so that XHTML content plays nicely with Atom elements of the
    same (namespace-unaware) name. I also implemented an XXE documentHook to
    add the XHTML namespace declaration to the top-level <code>div</code>
    elements at the appropriate places.</p></div></content>

    <category label="projects"
              scheme="ahttp://infinitesque.net/2005/categories/"
              term="Projects" />

    <id>tag:jlc6@po.cwru.edu,2005-11-29:AtomiXXE-0.1</id>

    <updated>2005-11-29T20:37:41-08:00</updated>
  </entry>
</feed>