Heal Your Church WebSite


Teaching, rebuking, correcting & training in righteous web design.

Using Word’03 to author XML documents

It’s the weekend, time for a coding project to get out of yard work and house cleaning. Oh wait, I like yard work – and now that I’m moving, not cleaning isn’t an option.

Okay, let me start over: It’s the weekend, time to play with something fun. How about replacing all those messsy include files for schedules and news with something structured? Like say some XML generated using Word 2003?

Hmmm, that solves your problem but not mine; here let’s try this for an opening: So that I might live vicariously through the rest of the HYCW cult while I’m busy packing, here is yet another great link I found while putting together a Thursday technoCache for blogs4God that is bound to keep you busy creating new tags and transforming old data: “Lightweight XML Editing in Word 2003.”

Amazon.com - Office 2003 XML: Integrating Office with the Rest of the WorldFirst, 1000 Uber-Geek points go to Evan Lenz for penning an O’Reilly publication; 100 more for getting an article online with the same. Actually, make that 1100 points and about $30 (USD) as it looks like I’m going to have to buy a copy of “Office 2003 XML: Integrating Office with the Rest of the World.

Why? Because while I knew Word’03 documents could be saved in XML, I never gave much thought to using Word as a lightweight XLST editor! From the article:

“This article presents a lightweight approach to XML editing in Word. It’s ‘lightweight’ in that it ignores all of Word’s built-in custom schema functionality. A nice side effect of this approach is that it works in all editions of Word 2003. All you need outside of Word is an XSLT processor …”

Hey folks, we’re programmers remember – or at least laypersons who aren’t afraid to get ourselves a bit dirty climbing a binary tree, right? If we don’t have an XSLT processor we can make one – or at least install something Open Source out there. Why? Glad you asked:

“This approach to editing will work only when your XML format is isomorphic to the structure and styles of your Word documents. The document’s markup will only be as rich as the styles that are applied to it, so this rules out full-on Docbook editing. Word doesn’t work well for editing recursive markup structures in general, because it doesn’t support recursive styles. Each paragraph has exactly one paragraph style, and each character is associated with exactly one character style.”

Sounds like something I could have used this past June when I was working on that isomorphic structure otherwise known as RSS (apologies in advance to David Winer).

Sounds like something others of you can use to design news feeds, schedules of events and other little snippets that we’ve often rendered as server-side include files.

Now if I could just convince my wife to out-source packing all our belongings I’d have time to play with such fun stuff … instead of boxing-up computer gear and throwing away old C++ books.

BTW, I’ve got a turn of the (last) century player piano – free for anyone or any organization who wants to come by and haul it away (or if you live nearby, we can enjoy a ride together in my pick-up truck).

One Comment

  1. Check out infopath, far more interesting for XML authoring IMHO