Jay R. Ashworth wrote:
On Sun, Jun 25, 2006 at 12:14:06PM -0600, Chad Perrin wrote:
[snip way too much text]
Let me summarize what <poem> does, how, and why. <poem> does two things:
1) It *modifies the behavior* of wiki syntax within its borders to preserve line breaks and initial whitespace in a different way from general text.
A CSS class by itself is insufficient to do this due to the transformations done in wikitext processing, so the extension preprocesses the input to allow the "natural" way of pasting in poem-like text to work.
2) It *marks* the contents with a distinct style class ('poem') which allows distinct styling to be applied to all <poem>s via the global style sheet.
For instance, one might use block indentation, color, or a different font style to make poems visually distinct in text output, and a different voice style or pitch for text-to-speech output.
One could also use this class marking to extract poem contents from rendered HTML data, as one could use the <poem> extension's presence to extract collected poem contents from the wikitext.
Further, a quick note about HTML. Plain old HTML contains a lot of often-forgotten semantic elements, such as:
<abbr> <acronym> <address> <code> <dfn> <kbd> <q> <samp> <var>
Some of those are supported in our wikitext because UseMod supported them; others we've never added. But in general, you can note that they often would not necessarily have distinct default styles. <samp>, <kbd> and <code> usually all render in a monospaced font, like <tt>. But they don't have to, and using distinct elements allows you to style them consistently, or to treat them differently when machine-extracting data. etc.
The set of semantic elements in HTML hints at its creation in a physics research lab full of computer geeks. It has excellent coverage for writing software manuals and project summary pages, but more limited coverage for, say, literature.
Our wiki text has a strong affinity with HTML; we render to it, we allow subsets of it, etc. But we aren't HTML exactly, and where our needs differ it is fully appropriate to have distinct semantic elements.
-- brion vibber (brion @ pobox.com)