forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@wkwyw.net>
Subject Re: Allow "role" attribute in document DTD
Date Sat, 27 Dec 2003 06:25:26 GMT
Jeff Turner wrote:
> +1 for the general idea.
> 
> Perhaps 'class' (as in HTML) instead of 'role'?  Is there a difference?

I did think about class, and in most cases it will do the job. The 
reason I didn't go for it in the end was because I thought that there 
may be a need for different classes of (in my case) slides. However, I 
haven't actually come across a use case for this yet.

Another reason for going with role was the REST architecture idea that 
an application could intelligently interpret the purpose of a part of a 
document using the role attribute. Class is about display only whereas 
"slide" or "glossary" are about the intended purpose of that section of 
data. In the original source document this is in the markup language 
itself, but in xdoc this is lost.

An example of why this may be important...

Suppose, we have a tutorial on how to build a Forrest web site. This 
tutorial has a series of links. Some of which give extra detail about a 
topic by linking to different tutorials. Some gice glossary definitions, 
some define a trail through the training materials. Using role you can 
indicate all of these. Consider the following code:

An XML document ready for display by Forrest conforms to <link 
href="xdocDTD" role="forrestTrailIntermediate glossary">Document v1.2 
DTD</link>, however, you need not write your documents in this format. 
By configuring your <link href="sitemap" role="forrestTrailAdvanced 
glossary">sitemap.xmap</link> accordingly and providing <link href="xsl" 
role="glossary">XSL</link> you can cause Forrest to convert any source 
format into the native XDoc format ready for display.

Here, we have three links. All of them have a role of "glossary", one 
indicates it is part of the intermediate forrest trail, the other is 
advanced. A client application can now be built that extracts all 
glossary terms from a website (by retrieving the XDoc source), or it 
could build a single document for the each of the forrest trails etc.

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.

Having said that, not using it may duplicate information.

What do you think?

Ross


Mime
View raw message