[Pmwiki-users] More on attachments

Patrick R. Michaud pmichaud at sci.tamucc.edu
Wed Nov 20 16:32:22 CST 2002

Basically you're proposing to create a WikiStyleSheet syntax with author-
editable stylesheets.  

Here's my basic take on content versus presentation markup:  
IN PRINCIPLE I fully agree with separating content from presentation--this 
was what HTML was intended to do (it failed) and what XML+XSL are 
supposed to do (success yet to be determined).

IN PRACTICE I don't think it quite works that way, because naive authors
(a primary audience for PmWiki) don't make mental distinctions between
content and presentation.  People authoring pages don't think "I want 
to display a booktitle"; they tend to think in terms of "I need this 
title to be blue text, bold, 14-point Times Roman".  So even if you give 
people the content-based tags and the ability to create them, they tend 
to be ignored.

Here's a terrific example--let's see a show of hands here--be honest!
  1.  How many people have actually used the HTML <ADDRESS> tag for
      displaying an address?
  2.  How many people even knew that HTML *has* (had?) an <ADDRESS> tag?  :-)

PmWiki already supports "stylesheets" at the administrator level--this
is what the $DoubleBrackets and $InlineReplacements arrays do.  They
allow customized stylesheets.  The faq.php add-in is an example of
a customized stylesheet; it simply adds "Q:" and "A:" to the markup 
and changes the rendering of the text following the "Q:" or "A:".

I've long wanted to define a standard "reserved" markup for style-based
markup; e.g., have everything look like "%q%", "%a%", "%book%", etc.
So far the double-% is the best I've been able to come up with and
I'm not terribly fond of it yet.  What you're proposing is to make
it possible for wiki authors to author/edit the stylesheet markups
instead of requiring an administrator to do it....and I'm not quite
ready to make the leap to user-authored stylesheets just yet (although
I've toyed with the idea many times).


On 21 Nov 2002, John Rankin wrote:

> I'd like to put forward a different approach for consideration. Is there a way of separating wiki-markup from its presentation? Using the %% idea to illustrate the principle, suppose I write:
> %booktitle%A Tale of Two Cities%%
> Now imagine a style page (could be wiki-wide or group specific, for argument's sake let's assume it's group-specific) called by convention Group/GroupStyles.
> I type %%booktitle at the start of a line and Save. Clicking on the booktitle? link takes me to a form where I choose attributes for booktitle. When I save, booktitle is rendered according to the attributes selected. When I look at A Tale of Two Cities, it displays with those attributes.
> I can see several benefits coming from this approach:
> - consistency across pages -- authors don't have to remember what the presentation convention is (or know what HTML attributes are), we just go to the GroupStyles page to see what's available (and we can add to them)
> - ease of maintenance -- we can change presentation convention in one place and all pages using that convention will change
> - more interesting searches -- could I type %booktitle% in a search box and get all pages that refer to books?? how about searching for %contributor%JohnRankin
> I can see problems:
> - which attributes are valid where (as was pointed out earlier in this discussion)
> - harder to learn, maybe
> - teaching authors to use names that describe purpose rather than look (%green% that renders red)
> Summary: %semanticmarkup% + wikistylepage = greater control and more choice

More information about the pmwiki-users mailing list