Friday, October 08, 2004

SMGL - I Geek Out

SMGL - Sméagol's Marked-Up Gollum Language

Rules:
  1. The root element is always <SMÉAGOL> because it's always abouts us.

  2. All elements should contain namespaces referring to global standards even though the markup is not global in nature, for instance: <HOBBIT xmlns:foo="http://www.middleearth.org/" xmlns="http://www.thestrugglefortheonering.org/">.

  3. Sméagol's default namespace always has two versions: <?Sméagol version="2.0"?>.

  4. <HOBBIT> elements must always have a default attribute labeling them either "DIRTY" or "TRICKSY".

  5. If a <HOBBIT> element is in the markup, the DTD requires a <POCKETS> tag as well.

  6. If there is a PRECIOUS text node in any <POCKET><CONTENT/> element, you must include a processing instruction that results in the elimination the <HOBBIT> node. Be careful, programming this is difficult and XML spiders are not entirely reliable.

  7. <DÉAGOL> elements may not contain a PRECIOUS text node.

  8. Entity expansion is strictly limited to <SAURON> nodes.

  9. Always close the markup with an (end/close) </PRECIOUS> tag. You don't need to finish well-forming your markup, just abruptly close.

  10. SMGL works best with particularly sensitive parsers - one that analyses and parses elements as carefully and anally as possible, almost obsessively, reparsing several extra times just to ensure content validity and DTD accuracy, is best.

2 comments:

PTW said...

That's it, you need to come home. And stay away from the computer. Maybe even from all electronic devices. If you get really desperate, it might be okay to play with your one handheld one-player circa-1980 football game.

klund said...

Two things: First, I would think that <HOBBIT> elements would also have an optional "FAT" attribute. Secondly, if a <HOBBIT> element contains the PRECIOUS text node, shouldn't there be a way to link the <SMEAGOL> element to it with some kind of "MASTER" attribute? I'm not a computer guy, so I'd leave the implementation up to you. Of course, I'm probably wrong, anyway.