W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > June 1997

Re: (off topic) MCF and XML-data and declarations in instances

From: Rick Jelliffe <ricko@allette.com.au>
Date: Sun, 29 Jun 1997 18:24:48 +1000
Message-Id: <199706290823.SAA28036@jawa.chilli.net.au>
To: <ricko@allette.com.au>, <w3c-sgml-wg@w3.org>
Someone suggested offline that I should post an 
example of [HyTime] description tables, so here is something.

It uses the HyTime description tables, linked with
xml-link syntax (more or less...)

(Please do not repost this outside the group, it is 
from a draft that may be in my book, so it is (C) me
and has not been checked, etc etc etc. )

Rick Jelliffe



Here is a way to provide structured documentation 
for element types and attributes,
using [HyTime] description tables and the [XML] link

The first step is to make a description table. 
This has a pattern similar to the
HTML definition list:

 <!ELEMENT desctab - O (desctxt, descdef)+ >
 <!ATTLIST desctab 
    id ID #REQUIRED>
 <!ELEMENT desctxt O O (#PCDATA)>
 <!ELEMENT descdef O O (%stuff;)>

where %stuff; is whatever element set you need. 
For example, you could have  

 <desctab id="mydtd">

  <menu lang="EN">title</menu>
  <menu lang="DE">titel</menu>
  <p>The title (e.g. of an article, or subsection).
 Must start with a number.</p>

  <menu lang="EN">paragraph</menu>
  <menu lang="DE">strophe</menu>
  <p>A logical paragraph. It may contain
 embedded lists, tables and figures.</p>

  <menu lang="EN">article</menu>
  <menu lang="DE">artikel</menu>
  <p>The top level element for articles.</p>

which specifies a table with three descriptions. 

The definitions include element for GUI
menu item text in English and German, a text 
explanation, and a lexical typing model
(using the HyLex syntax from [HyTime]), to allow 
a computer to perform stronger
typeing checks of the data. It could be extended 
according to taste to add
documentation and typing for attributes as well.

 <!ATTLIST art
    doco CDATA #IMPLIED   -- an XML link -->

and then 

 <art  doco="#ID(mydtd)child(ID(article))..DITTO(successor)">
 <title>1 Beginning</title>

You application must be programmed to interpret 
the documentation attribute as a
hypertext reference, of course, but the 
information is there. 
Received on Sunday, 29 June 1997 04:24:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:11 UTC