This is an experiment in designing a set of wiki interchange modules based upon AlexSchroeder's ideas on MarkupStandardPlanB. This was to create a very small subset as a basis. I'd suggested using the Abstract Module definitions that are part of the W3C's Modularization of XHTML specification, as that provides a readily-available set of module boundaries and names.
The following list is included for completeness; there are a lot of features in XHTML that aren't directly supported by wiki markup here on CommunityWiki, and certainly not across all wiki. But this provides a place to start anyway.
Admittedly, the Core for wiki will be somewhat different than the Core set using in XHTML, but I think this is easily managed.
Consider this page a work in progress, and an experiment. – MurrayAltheim
This structure (and the section reference numbers) is taken from XHTML Abstract Modules.
(The "&" following an element type name below means that the element declarations for these element types occur in a different module but are modified by that module, usually by additional attributes.)
This module declares the basic attributes shared by almost all XHTML elements, and can probably be ignored for our purposes.
The four "core" modules of XHTML will probably need to be reconsidered for wiki, but not by a lot.
XHTML elements in this module: body | head | html | title
These elements are really "background" markup within a wiki — wiki authors don't generally concern themselves with them. The <title> element is generally set as the wiki page title.
XHTML elements in this module: abbr | acronym | address | blockquote | br | cite | code | dfn | div | em | h1 | h2 | h3 | h4 | h5 | h6 | kbd | p | pre | q | samp | span | strong | var
This is broken down into these subsets:
Within what is considered the Text Module we find a great deal of traditional wiki functionality, so we're going to have to break it up a bit. Headings could be considered a single module, Block goes beyond what Alex is calling "Plan B" (as it includes <title>, <title>, <title>, and <title>, and the Inlines include a lot more than simply bold and italic. So what we've got is at the outset a mixed bag. I don't think it's too much of a problem, though.
Here's a direct paste of Alex' table, which I'm going to use as a model:
| Element | Example and Comments |
| Paragraph | Empty line separates paragraphs |
| Emphasis (usually italics) | ''emphasized words'' – an alternative like /emphasized words/ would be ok as well. |
| Strong emphasis (usually bold) | '''strong emphasis''' – an alternative like *strong emphasis* would be ok as well. |
| Unordered lists | Lines starting with an asterix followed by a space are list items. Nested lists, multi-line list items, and multi-paragraph list items are not requirements. Empty lines between list items may start a new list. |
| Internal CamelCase link | WikiWord – traditional local links |
| Internal free link | [[free link]] – some sort of free linking is required for scripts that do not have upper-case letters, eg. Chinese, Japanese, Arabic, Hebrew, etc. |
| External link | http://example.com/ – named links are not a requirement, eg. [http://example.com/ example] |
(I can't tonight continue editing any longer, so I'll come back to this later…)
XHTML elements in this module: a
XHTML elements in this module: dl | dt | dd | ol | ul | li
XHTML elements in this module: applet | param
This module probably would not be included in a wiki interchange format.
These modules include Presentation, Edit, and Bi-directional Text
XHTML elements in this module: b | big | hr | i | small | sub | sup | tt
XHTML elements in this module: del | ins
XHTML elements in this module: bdo
While this provides important internationalization features used by any natural language that isn't left-to-right, this module probably would not be included in a wiki interchange format.
This includes a Forms module, plus a subset of that called the Basic Forms Module.
XHTML elements in this module: form | input | label | select | option | textarea
XHTML elements in this module: form | input | select | option | textarea | button | fieldset | label | legend | optgroup
This includes a Tables module, plus a subset of that called the Basic Tables Module.
XHTML elements in this module: caption | table | td | th | tr
XHTML elements in this module: caption | table | td | th | tr | col | colgroup | tbody | thead | tfoot
XHTML elements in this module: img
XHTML elements in this module: a& | area | img& | input& | map | object&
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: img& | input&
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: object | param
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: frameset | frame | noframes
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: a& | area& | base& | link& | form&
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: iframe
This module probably would not be included in a wiki interchange format.
This module adds event-based attributes to the following element types: a& | area& | frameset& | form& | body& | label& | input& | select& | textarea& | button&
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: meta
This module probably would not be included in a wiki interchange format, though there might be some facility for setting wiki document metadata.
XHTML elements in this module: noscript | script
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: style
This module probably would not be included in a wiki interchange format.
This module defines the "style" attribute.
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: link
This module probably would not be included in a wiki interchange format.
XHTML elements in this module: base
This module probably would not be included in a wiki interchange format.
This defines the "name" attribute on the following element types: a& | applet& | form& | frame& | iframe& | img& | map&
This module probably would not be included in a wiki interchange format. Following the publication of HTML 4.0 over five years ago, the recommendation from the W3C has been to use the id attribute rather than the name attribute to create link targets, and to my knowledge all browsers have supported this for years. So we can safely ignore the name attribute. Any wiki engines that generate it should halt that practice and start using id.
XHTML elements in this module: basefont | center | dir | font | isindex | menu | s | strike | u
These element types are "deprecated" in XHTML 1.0. It's possible that some wiki support <font>, but this module probably would not be included in a wiki interchange format.
I'm going to further build on this by eventually providing tables like the ones in the W3C spec, but taking a cue from Alex. Anyone's welcome to help out, but give me a couple days to get the table together… anyone know how to make a table of contents link to the subsections? [are permanent anchors not enabled on CW?] --MurrayAltheim
I think I'm starting to see it.
You're going to choose some wiki markup for some of these sections, and automatically defining its XHTML equivalent for interchange?
As for permanent anchors: Within titles, no markup is allowed. On CW, permanent anchors within a p element are rendered via CSS to look like a header. That would make all the section titles into global link targets, however. I'm not sure we want that.
What I did, therefore, was to install the Oddmuse:Local Anchors Extension. I don't like the formatting rules proliferation, but once the code exists, installing it just comes so easily…
Alex, yeah, that's basically it, except I'm not even putting that high a priority on making any claims about the XHTML side of things. That kinda comes with the idea though, through the back door. This page seems pretty daunting simply because it includes everything in XHTML. But in reality, what we'll have (for example) is a "List Module" that will encapsulate the XHTML list elements as a named grouping (a module). We'll then be able to say, "there are the XHTML elements included in the List Module" and that's almost it.
Each XHTML module already has a canonical identifier (e.g., for the List Module it's "-//W3C//ELEMENTS XHTML Lists 1.0//EN"), so then anyone wanting to exchange wiki list information creates definitions for their wiki syntax that supports that module. In our case here on CW, we would certainly include the OddMuse/CW wiki list syntax. So we tie up a name, a group of elements, a "hook" to the XHTML, and a specific instance of wiki syntax for each module. Now, anyone who uses different wiki syntax, they just substitute theirs for that one part. This leaves people to write regex's for each module as, well, regex modules I guess.
I'm also open to suggestion! This is an experiment. I just know from my own experience that modularization can sometimes work wonders when dealing with big complex things. If you look at DocBook?, it's all modules. And for Terry Allen and Eve Maler (who wrote the original DocBook? DTD), this was a lifesaver. I just applied similar principles when I did the XHTML modularization. Hopefully this will be clearer after I've done a few example modules above. Probably the hardest one is "core," as after that it's all pretty much logical: what's in a list? what's in tables? etc.