PlanBWikiModules

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

Abstract Modules

This structure (and the section reference numbers) is taken from XHTML Abstract Modules.

5.1. Attribute Collections
5.2. Core Modules
5.2.1. Structure Module
5.2.2. Text Module
5.2.3. Hypertext Module
5.2.4. List Module
5.3. Applet Module
5.4. Text Extension Modules
5.4.1. Presentation Module
5.4.2. Edit Module
5.4.3. Bi-directional Text Module
5.5. Forms Modules
5.5.1. Basic Forms Module
5.5.2. Forms Module
5.6. Table Modules
5.6.1. Basic Tables Module
5.6.2. Tables Module
5.7. Image Modul
5.8. Client-side Image Map Module
5.9. Server-side Image Map Module
5.10. Object Module
5.11. Frames Module
5.12. Target Module
5.13. Iframe Module
5.14. Intrinsic Events Module
5.15. Metainformation Module
5.16. Scripting Module
5.17. Style Sheet Module
5.18. Style Attribute Module
5.19. Link Module
5.20. Base Module
5.21. Name Identification Module
5.22. Legacy Module

Abstract Module Definitions

(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.)

5.1. Attribute Collections

This module declares the basic attributes shared by almost all XHTML elements, and can probably be ignored for our purposes.

5.2. Core Modules

The four "core" modules of XHTML will probably need to be reconsidered for wiki, but not by a lot.

5.2.1. Structure Module

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.

5.2.2. Text Module

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:

ElementExample 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…)

5.2.3. Hypertext Module

XHTML elements in this module: a

5.2.4. List Module

XHTML elements in this module: dl | dt | dd | ol | ul | li

5.3. Applet Module

XHTML elements in this module: applet | param

This module probably would not be included in a wiki interchange format.

5.4. Text Extension Modules

These modules include Presentation, Edit, and Bi-directional Text

5.4.1. Presentation Module

XHTML elements in this module: b | big | hr | i | small | sub | sup | tt

5.4.2. Edit Module

XHTML elements in this module: del | ins

5.4.3. Bi-directional Text Module

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.

5.5. Forms Modules

This includes a Forms module, plus a subset of that called the Basic Forms Module.

5.5.1. Basic Forms Module

XHTML elements in this module: form | input | label | select | option | textarea

5.5.2. Forms Module

XHTML elements in this module: form | input | select | option | textarea | button | fieldset | label | legend | optgroup

5.6. Table Modules

This includes a Tables module, plus a subset of that called the Basic Tables Module.

5.6.1. Basic Tables Module

XHTML elements in this module: caption | table | td | th | tr

5.6.2. Tables Module

XHTML elements in this module: caption | table | td | th | tr | col | colgroup | tbody | thead | tfoot

5.7. Image Module

XHTML elements in this module: img

5.8. Client-side Image Map Module

XHTML elements in this module: a& | area | img& | input& | map | object&

This module probably would not be included in a wiki interchange format.

5.9. Server-side Image Map Module

XHTML elements in this module: img& | input&

This module probably would not be included in a wiki interchange format.

5.10. Object Module

XHTML elements in this module: object | param

This module probably would not be included in a wiki interchange format.

5.11. Frames Module

XHTML elements in this module: frameset | frame | noframes

This module probably would not be included in a wiki interchange format.

5.12. Target Module

XHTML elements in this module: a& | area& | base& | link& | form&

This module probably would not be included in a wiki interchange format.

5.13. Iframe Module

XHTML elements in this module: iframe

This module probably would not be included in a wiki interchange format.

5.14. Intrinsic Events Module

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.

5.15. Metainformation Module

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.

5.16. Scripting Module

XHTML elements in this module: noscript | script

This module probably would not be included in a wiki interchange format.

5.17. Style Sheet Module

XHTML elements in this module: style

This module probably would not be included in a wiki interchange format.

5.18. Style Attribute Module

This module defines the "style" attribute.

This module probably would not be included in a wiki interchange format.

5.19. Link Module

XHTML elements in this module: link

This module probably would not be included in a wiki interchange format.

5.20. Base Module

XHTML elements in this module: base

This module probably would not be included in a wiki interchange format.

5.21. Name Identification Module

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.

5.22. Legacy Module

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.


Comments/Discussion

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.

Define external redirect: DocBook

Languages: