WriteRight: XML and Cocoa

TidBITS offers a wishlist by Adam Engst for a writer-friendly word-processor.

Two related comments caught my eye. This:

WriteRight would refocus its style support somewhat. Styles are useful for the control they give over both the look of certain bits of text and other attributes (such as identifying a style that shouldn’t be spell checked, or that should be considered to be a URL). But what’s most important, though, is that styles be easy to define, apply, and modify, and that they be available to other programs. For instance, if InDesign and QuarkXPress can’t read a word processor’s character and paragraph styles, it simply won’t be acceptable for producing documents for layout. WriteRight should also have HTML and XML export features that work from character and paragraph style definitions, since the easier it is to repurpose text, the better.

… and this:

WriteRight must not only read and write Word documents, it must use the Word file format in as close to a native fashion as possible. Realistically, that probably means RTF, though it will need to at least convert Word files from .doc to .rtf format without losing anything.

I’m afraid I must disagree here. Trying to play catch-up with Word is a losing battle. Instead of using RTF to pass data around with services and such, how about using the OpenOffice XML file format? Rather than me explain why, here’s Tim Bray on the OO.o format:

The way that these guys store the data is massively, fiendishly, outrageously clever. They have their own XML tag set, which includes (in one namespace) all the basic word-processing, spreadsheet, and slide-show machinery. Then, for graphics they use SVG, for styles they use XSL-FO, for links they use XLink… you get the picture, they’ve invented the absolute minimum possible.

You know what this is? This is exactly what the people who invented XML thought they (er, we) were doing it for. It’s no secret that the original XML cabal was a bunch of of publishing geeks, and we thought we were building a next-generation general-purpose document format. Except for, the XML world charged off after B2B and Web Services and transactions and RSS and so on, and hey that’s fine, it works well for all those things. But what we had in mind is more or less exactly what OpenOffice is doing.

What if deep support for XML and XSLT was integrated with Cocoa/OS X? It could allow Keynote to be seamlessly upgraded to export/import, say, OpenOffice presentation files, or XHTML. It could allow a developer creating a word-processing app to do something similar. Bundle XSLT files to move back-and-forth between OO.o, XHTML, and WordML. Finally, upgrade system-level XML support to handle the schema languages (particularly RELAX NG), and allow for an application to register its schema with the OS to facilitate better communication of semantically-rich data.

I pull my hair out sometimes when I see an interesting Cocoa app like VoodooPad which has “XML export,” but which does not actually support any of the principles of structured markup (the content is just dumb text). I think if Apple improved XML support and evangelized it, that would change. It’s really time for Apple and its developers to understand the potential of XML, and to exploit it!

Comments are closed.


Creative Commons License Creative Commons License