Joseba Abaitua wrote:
> Is there any way to indicate the linear order in which tags may occur in
> a document?
> This is our problem:
> We want to generate text from a DTD. This DTD has a number of <DIV
> type=ATT> sections, but we don't find any way to express their relative
> order in the document by means of their attributes. Is there any
> possible way of stating this ordering in the DTD, such that:
> <DIV type=heading>
> <DIV type=body>
> <DIV type=end>
> <!ELEMENT - - DIV+ >
> <!ATTlLIST div (heading | body | end)>
> in addition to these, there is some way of stating that:
> heading > body > end
> where '>' means 'precedes'
An SGML parser cannot report ordering mistakes based on attribute
values. But I think that you could use an SGML architecture to make the
attribute values into elements <HEADING> <body> and <end> and then map
those back to TEI <DIV>s.