Structure and Behaviour - Formatting and Behaviour

This is a long overdue contribution to the XML-LINK review process. I
apologise for presenting this so late in the day, but I hope that the
four weeks before July 1 will be sufficient for this contribution to be
of use.

Peter Murray-Rust wrote (on the xml-dev forum):

>>Structure and Behaviour.
My understanding is that a hyperdocument can have a link structure which
is independent of behaviour - it simply represents the structure of the
information.  I'm happy with this - what I'm less clear about is whether
there are *commonly agreed semantics* for this, or whether it's all
application-dependent.  [If the answer to all my concerns is
'application-dependent' then it will be a pity because everyone will
write individual link processors and there will be no reusability.]  I'm
aware that all these concerns are catered for by HyTime, but since I am
ignorant of HyTime, answers which refer to that won't be much use to me
- ideally they should be in the context of the current spec.
Thus I assume we can transmit structures like DAGs, linked lists,
relational tables, etc. by the use of XML-LINK without being concerned
how they are going to behave.  At this stage I'd like simply to address
structure.
<<

I absolutely agree. The link is about structure, not about behaviour.

Consider the following:

<person ID="drm">
   <name>Daniel Rivers-Moore</name>
   <nationality>British</nationality>
</person>
<person ID="ts">
   <name>Tony Stewart</name>
   <nationality>American</nationality>
</person>
<organisation ID="rivcom">
   <name>RivCom</name>
   <business>publishing structured information</business>
</organisation>
<employment XML-LINK="EXTENDED"> 
   <employer XML-LINK="LOCATOR" HREF="#rivcom" ROLE="employer"/>
   <employee XML-LINK="LOCATOR" HREF="#drm" ROLE="employee"/>
</employment>
<employment XML-LINK="EXTENDED"> 
   <employer XML-LINK="LOCATOR" HREF="#rivcom" ROLE="employer"/>
   <employee XML-LINK="LOCATOR" HREF="#ts" ROLE="employee"/>
</employment>

There is no SHOW, no ACTUATE and no BEHAVIOR attribute on the link
elements or their locator subelements. To have any of these attributes
would be to say _in_the_document_itself_  how the information should be
presented. But the document should just say what the information _is_.
The place for presentational instructions is in the stylesheet.

Having said this, I think it has been extremely useful for the SHOW,
ACTUATE and BEHAVIOR attributes to have been placed in XML-LINK
_in_this_early_draft_. Given that XML-STYLE has not yet been produced,
and given that in order to start implementing XML-LINK, there has to be
some way to specify how linked information should be presented to the
user, putting it in XML-LINK is a valid _temporary_ solution.

But when XML-STYLE is written, it should include ways of specifying not
only typographic, spatial etc. information about presentation of element
content, but also behavioural information, both about element content
and about links. At that time, the SHOW, ACTUATE and BEHAVIOR attributes
should be migrated from XML-LINK to XML-STYLE.

It will then be possible to have stylesheets with the following kinds of
result:

Under stylesheet 1:
The employer's name and business are displayed in the browser window.
The employer's name is a hotspot which, when clicked, spawns a popup
window showing a list of the employees with their names and
nationalities

Under stylesheet 2:
The employer's and employees' names are displayed in the browser window.
The employer's name is a hotspot which, when clicked, spawns a popup
window showing the employer's line of business. The employees' names are
hotspots which, when clicked, spawn a popup window showing the relevant
employee's nationality.

Under stylesheet 3:
The employer's name is displayed in bold type in the top row of a table,
spanning two columns. The employer's line of business is not displayed
at all. Subsequent rows of the table show the employees' names in the
first column, and their nationalities in the second.

... and so on

All these kinds of behaviour and more are controlled by stylesheets in
RivCom's XML plugin for Netscape which I demonstrated at WWW6 in Santa
Clara and at SGML Europe 97 in Barcelona. In that demo, the styles were
applied in a context-dependent way to elements, and could be controlled
in very intuitive and flexible ways by user actions. That plugin does
not currently support XML-LINK. However, the principle is the same, and
the plugin is an eloquent demonstration of the fact that a stylesheet is
an appropriate means to control not just appearance but also behaviour
(functionality). Indeed, the boundary between appearance and
behaviour/functionality is very hard to draw. Both are about
presentation, not about content. This is why they should _not_ be
encoded as part of the document instance (content) but as part of the
stylesheet (presentation).

Someone said today "We are migrating from a document-centric world to a
data-centric world. The document is just a snapshot of the data."  I
would add "The document is a snapshot of the data viewed according to
certain rules of selection and presentation".

The data is in the content. The presentation is in the stylesheet. The
links are part of the content. Their behaviour is not.

Received on Friday, 6 June 1997 06:03:39 UTC