forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Adding @class attribute to all xdoc elements
Date Tue, 09 Sep 2003 08:50:20 GMT
Ramon Prades wrote:

> Hi Nicola
> 
> The problem with this attribute, as pointed before by Jeff Turner, is that
> "class "attribute will break content-presentation separation, since the
> forrest doc focuses on content but that attribute belongs to presentation.

Well, actually no. A class attribute defines the "class" to which a tag 
belings to. This does not mean that it has to be shown in a particular way.

The stylesheet shows the style, not the class attribute.

Example:

Imagine that we lacked a <note> tag. A user could do:

   <p class="note"></p>

This has nothing to do with presentation, just semantics. It's an easy 
way to augment semantics and keep style separate.

ATM users are using ehtml to do this, which does *not* enforce this 
separation, having style tags in the html.

> Having said that, I recognise there's a need for altering the way Forrest
> applies style to certain documents, but maybe there's a better solution.
> Perhaps a "meta" tag telling the user-defined type of document (as in
> "white-paper", "article", and so on), and then some extra config in
> "skinconf" binding an specific type to a different css or selector. This
> could also be used to alter the way Forrest generates the page.
> 
> For example:
> 
> -- skinconf.xml --
> <skinconfig>
>   <document-skin type="white-paper">
>     <display-abstract>false</display-abstract>
>     <display-toc>false</display-toc>
>     <style link="anyfile.css">
>       <title>myTitle</title>  <!-- this will use selector "myTitle" to
> display "title" tags -->
>       <p>font-family: Arial, Helvetica, sans-serif; font-size: 9px;color:
> #0033FF;</p> <!-- inline style -->
>     </style>
>   </document-skin>
> </skinconfig>
> 
> This is just an idea. 

I think this is a bit complicated. If the user just needs to change a 
CSS stylesheet to change presentation, isn't it easier and cleaner just 
to change that stylesheet?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Mime
View raw message