Re: Recognizing Sequences (was More XSL Discussion)

Subject: Re: Recognizing Sequences (was More XSL Discussion)
From: Sean Mc Grath <digitome@xxxxxx>
Date: Fri, 27 Feb 1998 15:46:05 GMT
>Mike Kay, ICL
>
>The natural conclusion from this line of reasoning might be that we ought
>really to be associating processing actions with syntax rules in the
>document's DTD. Thoughts?

I gave a paper at SGML '96 on exactly this topic.
When drawing analogies between SGML DTDs and Jackson structure
models, one inevitably arrives at the point where the analogy
breaks down. That point is where actions are attatched. The question
then begs to be asked "why not attach actions to the component
parts of content models?"

In Jackson-think the DTD is the ideal place to specify actions
because context can be made explicit in the model so that you
do not have to hand-craft it with predicates like "If I am the 
first item in a list, do this, else do this".

If you have:

<!ELEMENT list (item)+>

and want to do something special to the first item in a list you
can change the model to an equivalent one:

<!ELEMENT list (item,item*)>

Now you hang your actions out of the two item elements in the model
and the application can do the rest. This way you don't need
"if first item then do this ..." because the "first item" context
is now explicit in the model.

In Jackson, there is no such thing as *the* correct model. There are
any number of equally correct models. You pick the one that suits
the problem at hand. In the case of formatting, Jacksons ideas
could, I think be very useful!


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread