Re: syntax limitations of DTDs (off topic?)

Subject: Re: syntax limitations of DTDs (off topic?)
From: Matthias Clasen <clasen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Oct 1999 18:10:45 +0200
Three things:

1) You must use an SGML declaration with OMITTAG YES if you want
   to omit any tags. 

2) The middle start tag is even then not omittable, since it is not
   `contextually required' 

3) Even if you fix this by removing the ? in the element type declaration
   of bad, you get an error because the end tag for middle is implied when
   the <after> is seen. But at that point, middle can't be closed because
   the last token was a #pcdata token, namely the RE between </block>
   and <after>.



> 
> Hi there,
> 
> does anyone have a pointer to the limitations for the structure of sgml
> DTDs? Apparently the set of available langauges is a subset of LL(1)
> as the following example shows:
> 
> <!doctype bad [
> <!element bad       - - (before,middle?,after)                >
> <!element before    - - (#pcdata)                             >
> <!element after     - - (#pcdata)                             >
> <!element middle    O O (block,(#pcdata,block)*)              >
> <!element block     - - (#pcdata)                             >
> ]>
> <bad>
> <before>bla bla</before>
> <block>bla bla</block> and <block>blo blo</block>
> <after>bla bla</after>
> </bad>
> 
> 
> Regards,
> 	Holger Klawitter
> --
> Holger Klawitter                                     +49 (0)251 484 0637
> holger@xxxxxxxxxxxx                             http://www.klawitter.de/
> 
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist
> 

-- 
Matthias Clasen, 
Tel. 0761/203-5606
Email: clasen@xxxxxxxxxxxxxxxxxxxxxxxxxx
Mathematisches Institut, Albert-Ludwigs-Universitaet Freiburg


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread