[wiki-standards] WikiWyg --> interwiki markup translators for free
sunir at sunir.org
Tue Mar 28 18:36:15 CEST 2006
> Are you suggesting that html is an intermediate form?
Since this is done in browser via the DOM, the
deformations to HTML are taken care of by the browser,
kind of. There are some gotchas with the rules XML. For
gets translated to
* paragraph one (CDATA)
* paragraph two (CDATA)
Which is correct from XML's point of view, as paragraph
one is the CDATA for <body>.
I'm sure the Safari is totally bs, just because it's
The most important and common wiki syntax forms are
isomorphic to HTML entities.
lists <ol/>, <ul/>, <dl/>
horizontal rule <hr/>
bold <strong/> <b/>
italic <em/> <i/>
The only problems are
* some/most wiki engines do not have error-free syntax
* some wikis have other syntax that generates HTML
using the tags above.
In either case, it doesn't matter, since the formatter
needs to be recoded for wikiwyg. You can either fix
the formatting and/or ignore the untranslateable syntax.
Finally links are fairly easy to detect. From the
wiki syntax level, use the LinkPattern. From the
HTML level, the html must have a <base href/>, either
in the HTMl itself, or supplied by the user agent.
Scan for links that are have the base href at the root.
If the query string or last path segment (for mod_rewrite)
matches the LinkPattern, it's a link to the wiki.
Since this is magical, the wiki formatter should also
mark all wiki links with a CSS class, "wiki_link"
Similar classes can be added for interwiki_link. All
other URLs are assumed to be external.
More information about the wiki-standards