forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hargreaves <supp...@pdh-online.info>
Subject Re: Allow "role" attribute in document DTD
Date Sun, 28 Dec 2003 11:32:22 GMT
On Sat, 2003-12-27 at 13:55, Ross Gardler wrote:
> >>Since class is intended to describe display information I'm not sure if 
> >>it could be used for this same purpose, it may just confuse things as 
> >>we'd likely end up with classes that didn't affect display.
> > 
> > 
> > That's fine, however there is already a 'role' attribute defined for
> > <link>.
> 
> Yes, I forgot that, sorry, been a long time since I started using that, 
> so my example was a very poor one, perhaps below will be better.
> 
> > So do you want to define @role more generally, to apply to other
> > elements?  If so, what is the use-case?  
> 
> At present the only plac my use case needs it is in the section element, 
> but perhaps more general would be useful.
> 
> Now that you are forcing me into explaining the use case I am becoming 
> more convinced that you are right and this is in fact a class. However, 
> I also introduced another attribute recently. This one was origianlly 
> "level" as in level of detail (I use Forrest to deliver course support 
> materials). However, I have recently decided this should be part of the 
> role attribute.
> 
> Basically, I tag some parts as being "BSc", "MSc", "MBA" etc. Other 
> parts are tagged as course focus, for example case studies have roles 
> such as "ECommerce_Analysis" or "MBA_Anaysis". I then use these to 
> select which part of the document should be displayed. So if I have an 
> MBA student veiwing the page they get the "BSc" + "MBA" content of 
> general pages and the "MBA_Analysis" of case studies.
> 
> Since much of the content is shared I do not want to split it into 
> different documents, so I use role to enable me to do that dynamcally.
> 
>  > Isn't that use-case
>  > presentational?  If presentational, why not use class?
> 
> I have to admit I'm a little unsure if this is presentational or not. I 
> think of presentation as being *how* it is displayed whereas much of my 
> use for the role attribute is *what* is displayed (clearly I use Forrest 
> in a dynamic environment).
IMO - In your document it is not presentation, it is just content and
semantic markup, but your skin might later use the markup for
presentational purposes - if it feels that way inclined. After all most
of your dtd markup is used for presentational decisions.

So, forget about thinking presentation in your dtd and think about what
meaning you want to include in the document. So, why not:

<section usecase="BSc"> or as you suggest <section role="BSc">

I've used things like <section onlyfor="user,admin"> or <section
notfor="guest,visitor"> in my application.

Hope my comments help.
Peter.
P.S. DocBook is great for inspiration on markup.
> I have similar use cases with data from electronic sensor devices. The 
> engineers get one lot of data, the management another etc.
> 
> Ross
-- 


Mime
View raw message