[pmwiki-users] floating box on the right
Patrick R. Michaud
pmichaud at pobox.com
Wed Mar 23 22:49:24 CST 2005
On Thu, Mar 24, 2005 at 04:16:55PM +1200, John Rankin wrote:
>
> >It certainly would not be too difficult to simply add another
> >wikistyle attribute that indicates the semantic meaning of a
> >particular style (and thereby be usefully used in translating
> >text delimited by the wikistyle to something other than HTML).
>
> How would that relate to the %define=...% syntax, which can be
> used either to define appearance:
>
> %define=hotpink color=#ff69b4%
>
> or meaning:
>
> %define=embarrased color=#ff69b4%
>
> The benefit of using markup rather a 'semantic meaning attribute'
> is that the markup defines a controlled vocabulary, which makes it
> easier to analyse. I need to think about this some more...
I think you can still have a controlled vocabulary within the
context of wikistyles-- simply identify which wikistyle definitions
(or semantic attribute values) have meaning for your rendered output,
and ignore any styles that aren't in the defined set if they aren't
directly relevant to the rendering.
Here's a perhaps more concrete example (off the top of my head).
We could define a wikistyle attribute -- for convenience I'll name
it "semantic" here -- then have any text with that attribute applied
rendered within a couple of appropriate HTML comments.
Thus:
%define=embarrassed color=#ff69b4 semantic=embarrassed%
I %embarrassed% can't believe %% I'm writing this.
could produce on output
I <!--embarrassed--><span style='color:#ff69b4'> can't
believe </span><!--/embarrassed--> I'm writing this.
Any wikistyle with semantic=embarrassed (or based on the %embarrassed%
style as defined above) would have these comments around them. Or,
in the present discussion, we define %stickynote% with
semantic=stickynote as
%define=stickynote class=stickynote semantic=stickynote%
and then
%stickynote% This is a sticky note.
becomes
<!--stickynote--><span class='stickynote'> This is a sticky
note.</span><!--/stickynote-->
Note that the semantics can still be divorced from styling, so that
%class=stickynote% This looks like a stickynote but doesn't
have stickynote semantics.
or
%stickynote semantic=none% This looks like a stickynote but doesn't
have stickynote semantics.
becomes
<span class='stickynote'> This looks like a stickynote but
doesn't have stickynote semantics.</span>
The stickynote semantic can be applied to multiple styles, so:
%define=slipperynote semantic=stickynote%
%slipperynote% This has stickynote semantics but doesn't
look like one.
%define=yellownote stickynote bgcolor=yellow%
%yellownote% This is a yellow stickynote, retaining stickynote
semantics.
becomes
<!--stickynote--> This has stickynote semantics but
doesn't look like one.<--/stickynote-->
<!--stickynote--><span style='background-color:yellow;'> This is
a yellow stickynote, and renders as one.</span><!--/stickynote-->
Of course, it would be equally possible to have the "semantic"
attribute generate custom tags other than HTML comments, based on
whatever vocabulary is desired by the administrator or the
recipes being loaded.
Just some ideas off the top of my head.
Pm
More information about the pmwiki-users
mailing list