` If only we had a Standard Generalized Markup Language! — imaginary family values

Last update on .

If you’ve been participating in various Web-based forums for a while, you may have noticed the great variety of ways you can avoid polluting your fingers with HTML.

  • Some venerable bulletin-board systems use UBBCode™. See, in HTML, if you want to make something boldface, you use <b>codes surrounded by angle brackets</b>, but UBBCode™ uses [b]square brackets[/b], which are obviously superior.
  • Some blog software uses Markdown, where you can generate an ordered list by putting a digit in front of every list item and create a first-level header by starting a line with “#”. Others (including the software that runs this humble site) use Textile, where you use “#” to make an ordered list and “h1.” to make a header.
  • In the Wiki world, you can usually make a link to another page simply by writing the page title in CamelCase. If you’re composing a page on a MoinMoin wiki and you want to link to a page with normal capitalization, you put the page title in [square brackets]. But if you’re using TWiki or MediaWiki, you put it in [[double square brackets]]. And of course, if you want the text the user sees on the screen to be something other than the name of the page the link points to, TWiki and MediaWiki provide different ways to do that.

Of course, you can use HTML-style tags and escaping within most of these markup languages, but they all have their obscure rules lurking in the background regarding what they’ll accept. TWiki doesn’t allow newlines within an HTML tag (e.g., between an element name and its attributes). If you write an HTML tag in Textile with escaped angle brackets (like “&lt;b&gt”, Textile will happily translate those escaped characters back into angle brackets. (Guess how I found that out.)

Why this Babel of markup languages? I can imagine three justifications:

  1. HTML is hard.
  2. The alternative markup languages can be easily translated into valid (X)HTML on the server end, whereas if users are expected to type HTML into these little text boxes, then they’ll input “tag soup” that mucks everything up.
  3. Alternative markup languages allow you to add markup features that HTML doesn’t have1.

To which I say

  1. And these other systems aren’t? Users who can’t stand typing in all these angle brackets are better off using one of the new Javascript-based Web WYSIWYG editors.
  2. That’s why we have tools like TagSoup and HTML Tidy.
  3. It would be better to add those features with language extensions that are consistent with HTML2, and then use XSL on the server side to rearrange things.

Some day, perhaps, in my Copious Free Time, I will write my own damn blog software that takes its XML straight. I’m sure there are three or four other geeks in the world who would appreciate such a thing. In the meantime, if you want to write a comment on this fine blog for posterity3, you have to use Textile markup. It’s really quite easy once you get the hang of it.

1 Footnotes, for instance.

2 The user could, for example, put <span class=”footnote”>(body of footnote)</span> wherever he or she wanted a footnote marker, and the server could move that text to the end of a document and put the appropriate footnote mark in its place.

3 Hello, posterity!

Similar entries

Pingbacks

Pingbacks are closed.

Trackbacks

Comments

Comments are closed.