On Sun, 2002-04-14 at 05:17, Stephan Diehl wrote:
> > In place of a canonical text-based markup, I'd like to work on
> > reversable translations, from some abstract (XML) backend to various
> > other formats -- the viewable HTML, something fit for WYSIWYG editors
> > (and IE), something for people editing text, etc.
> Why not have both? The ASCII markup is just a shorthand for some XML format
> that is used internally? We would have the best of both worlds: easy editing
> with the browser and a good internal representation.
> If you could live with ASCII markup, I'd try to write a python parser for the
> TWiki syntax (or copy some stuff from MoinMoin).
Yes, converting is what I was thinking about. I don't know how
important the fullness of the markup is -- TWiki, for instance, might be
too full. We don't need to cover every kind of layout -- tables,
definition lists, etc. -- just the ones that are typical and
That's what I was thinking about with reversable translations --
translating the XML (XHTML-based) markup into other kinds of markup, and
back again. The problem with many Wiki markups is the canonical form is
plain text, and so the WYSIWYG editor and the text editor will clash.
TWiki-like markup might actually be fine, since it accepts HTML in
addition to other kinds of markup. The original Wiki markup wasn't as
rich as HTML (and didn't allow embedding), so it wouldn't be
In terms of reversability, it only matters that when you translate from
XML to text markup, and then back to XML markup, it should be
XML-equivalent (so whitespace don't matter much, among other things). A
good translator would have to use heuristics to figure out where
text-markup is helpful and where it's easiest to leave the XML markup.
The current translator only changes Wiki links to be formatted with
's, and <p> to be \n\n, which probably covers nearly 50% of the usage
(by volume). Bold, italic, and other simple markup would probably cover
another 25%. With lists and a couple other structural markups, you'd
have most of the rest, I'd think. Things like the table support in
TWiki didn't impress me -- it was like learning tables all over again,
except I learned about HTML tables for other reasons a long time ago and
I'd rather just use that knowledge.
Then there's non-XHTML markup... the Wiki links are the first such
markup, but other's would probably come along. MoinMoin and TWiki have
a ton of them, where the original Wiki only has the Wiki links... I
don't know where to draw the line. At some point those Wikis are taking
the place of an application framework, but we already have an
application framework so we don't need to do that. But there are some
really cool ones... like TWiki has one where you can embed LaTeX math
expressions, and it will inline an image of that expression. I don't
write many math expressions, but if I did I'm sure I'd fall in love with
that. That makes sense, too... but embedding an RSS feed of slashdot
seems more superfluous. Maybe if it's properly modular it won't matter.