semantics vs. styles was Re: [pmwiki-users] Re: floating box on the right

Patrick R. Michaud pmichaud at pobox.com
Fri Mar 25 17:52:57 CST 2005


On Fri, Mar 25, 2005 at 03:41:38AM -0500, Radu wrote:
> stylistic use:
> * %note% defined in a css statement somewhere above (terse) and
> * %bgcolor=yellow% (verbose)
> 
> These are not the best examples, since they refer to different elements.
> 
> BTW, I agree with jr's concern about having a semantic equivalent to pure 
> styling markup, on anything that's definable functionally (e.g. stickies, 
> comments, misc. widgets). And as pm noted, I doubt that is a problem 
> currently for pmwiki.

Yes, it's only a problem if one thinks of %note% as being "strictly
stylistic".  I think I can fairly well argue that things like %note%,
%stickynote%, %address%, %quote%, %sub%, %comment% and the like are 
semantic and structural elements, and the fact that they produce a 
different rendering style is incidental to the markup.  
By way of analogy, HTML (XHTML 2.0) provides <address>, <quote>, 
<blockquote>, <sub>, and <!--...--> elements, each of which is 
still considered "semantic" even though they imply changes in 
the stylistic rendering of their contents.

Thus, in the case of

    %note% You definitely want to read this.
    %bgcolor=yellow% Read this also.

I argue that %note% is an example of using %...% as semantic
markup, while %bgcolor=yellow% is stylistic.

I suppose that one can try to make the counter-argument that semantic
markup and stylistic markup should have different syntaxes, but I don't
see how this improves things for authors (PmWikiPhilosophy #1) -- it
imposes another layer of rules to learn.  As an author, I want to be
able to write %note%, %bgcolor=yellow%, %outline%, %blue note%, etc.
without having to figure out if it's a semantic or stylistic markup.

One of the things that has *always* bugged me about HTML and XHTML
is that as an author I don't have an easy way to immediately define any
new semantic markups appropriate for the document I'm writing.  For
example, it would be nice if HTML provided me a way to define <booktitle>
and its corresponding "booktitle" CSS stylings without having to
create a whole new DTD for it.  Instead, at best I can write
<span class='booktitle'>, which loses semantic meaning, or at least
moves the meaning out of the document structure and into the stylesheet.

HTML is like a programming language where authors aren't allowed
to define their own functions -- you're strictly limited to the ones
explicitly defined by the language.  PmWiki tries to get away from that
by allowing site administrators and authors the ability to define
new (semantics-based) markups that are appropriate to whatever
documents they happen to be writing.

Pm



More information about the pmwiki-users mailing list