Making a donkey from a hamburger (XHTML)

Peter Sefton and we are collaborating on tools to create XHTML and other markup languages in a simple environment. But surely there are tools already to manage HTML – it’s ca 15 years old…? Yes, there are tools – and here’s Peter’s account of how he fared with the Word version – typical quote (this is into stage 27!!):
PeterSefton:

You see that? Word has helpfully put on margin-left:-180.0pt. Hmm a left margin of minus one hundred and eighty points
Give up in disgust. I can’t see a way to get Word 2007 to make a blockquote.
(And I tried a couple of other things too, like guessing that if I used a style like HTML Blockquote Word might magically Do (Nearly) The Right Thing the way it does with HTML Preformatted style. It doesn’t it makes a paragraph with class HTMLBlockquot but with the wrong CSS. Oh well.) Actually I can’t give up because I have yet to play with the lists.
There’s a bit in my paper where I have a blockquote with a list embedded in it. That’s perfectly possible in ICE, but would be very hard in Word. So lets look for an easier case.
and on it goes – finally:
This sux.
The worst bit was when I managed to get a word document that contained a blockquote that is invisible through the editing interface, but which creates nightmares like invisible paragraphs with their left margin miles off the screen.
If you gave Word 2003 to somebody and asked them to write a paper that could be given to a fussy HTML publisher and also printed with nice headers and footers, or saved to PDF then they’d be stuck.
Which I kind of knew, which is why we invented ICE. But I needed to go through this so I can show the results for the paper I’m writing.
Next up, OpenOffice.org Writer. What do you think OOo fans? Will it do any better? An how about Google Docs?

I wouldn’t bet on it – but appalling though Word is it’s no worse than WordPress (in which this blog is written). And this tool is specifically to write HTML. I know how to write HTML – I’ve done it for 15 years. It’s fairly simple, and I use a simple subset. So it should be easy to create a blog post. WordPress even gives me a way to author natively in HTML.
But here are some of its fun things:

  • try adding code (I can’t use the HTML tags as illustration so they will have to be imagined here). You can type it literally, but wherever you put lines breaks (with or without “pre” tags) it will usually expand across the whole page.
  • try rendering XML. It will often be visible OK. Then when you save it disappears. Maybe the code is still there. No, all the lines have been replaced by a “br” tag. Everything is lost
  • add a style for a paragraph such as Italic. Then the whole of the rest of the post is made italic. You can’t get rid of it by unhighlighting because every sentence contains empty “em” tags. Hundreds of them. You can’t take them out by hand. The post is ruined.
  • Blockquotes may be present but simply don’t display. This cause terrible problems when trying to separate my text from the quoted stuff. And sometimes the unindentation only happens at the final save.
  • And the worst problem is cut and paste. This is simply full of landmines waiting to explode. Yet why should be have to retype from another blog?

And many of these problems have knockon effects. When the post is aggregated by Planets (e.g PlanetBlueObelisk) all the posts after it get contaminated with the infecting styles and I get irritable messages from other BO people. (Actually they are very tolerant).
So this is making a monkey or donkey from a hamburger. Why do we have such awful tools? OK, it’s free and Open and it does things very well apart from the text editing.
It’s not difficult to save a simple HTMLDOM. HTMLTidy will keep the tags clean. So please, WordPress, can we have a “what you get is what you want”?
[Note added afterwards. I really thought I had got this right. But when it appeared in final form WordPress has inserted a large number of empty “a” elements in the text (I daren’t type the HTML in this blog. The message is clear – you cannot cut and paste from other blogs – or anywhere else. Or if you do you have to save it in a text editor.]

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Making a donkey from a hamburger (XHTML)

  1. Negative margins are actually meaningful – often very useful! – in the XHTML/CSS rendering model. The classic example is on A List Apart – http://alistapart.com/articles/negativemargins/. That’s a bit of a red-herring here.

Leave a Reply

Your email address will not be published. Required fields are marked *