Motivation

Generating valid HTML output has proven to be difficult. Because XML is much less forgiving than a browser it might be a good idea to do the harder job first.

Wiki XML

The exact format of Wiki XML is still open. It would be nice to have a WikiDtd and as an extentions the MoinMoinDtd. See also: WikiXml

DOM tree vs tags

Because we want to reuse the result, the implementation should not be too DOM centric. There is an obvious analogy between generating a text/xml document and build a DOM tree. To make this more clear:

XML document

DOM operation

process line by line

depth first traversal

open tag

add node as last child at "current" position node
move current position to new node

close tag

move "current" one node up

With implementation of .new_tag() .close_tag() it should be easy to reuse the code to produce text/xml or text/html.

Ideas/Problems

Opening a tag

Unbreakable tag

breakable tag

Closing tag

comments

I do not see the problem with opening and closing tags. Nobody should want to write a new parser. I think there a re a lot of tools that can be embedded that know how to handle. If we use a DTD or a schema all should work by definition. The problem is, is tags are written by a new parser that can not read DTDs or Schemas. -- ThiloPfennig 2005-12-18 10:03:33

MoinMoin: WikiDomFormatter (last edited 2007-10-29 19:14:14 by localhost)