This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ELEMENT declaration in DTD


Hello!

(wait wait, hold the press i know this one!)

>    <!ELEMENT foobar - - ((some|stuff)*)>
> or
>    <!ELEMENT foobar - O ((some|stuff)*)>
> 
> What are the '-' and 'O' doing in there?  A case of virtual beer if you 
> include an XML Spec. section citation.  :-)
>
The dtd you are looking into to learn xml may well be an sgml dtd...!(it is)

-
This is a dash for NO omission (of the start-tag of the element foo)

O
and this an O (for omission, not zero) indicating that the tag may be omitted.

 -The rest of the declaration is the same as it would be in an xml-dtd.
This facility (tag omission) is omitted (::) in the subset of sgml which is xml.
The reason why this is not part of xml is that these types of rules are hard (and expensive) to implement in software.

-Hence the only "omittance" allowed in xml is in empty elements which are declared empty and may not have content. But this is not really omission like in sgml so why worry..?

> Thanks loudly and with cymbals.

You're welcome!!
:)

Kind Regards, Inge
-- 
   |จจจจจจจจจจจจ|  	   
   |  telmin    \  	   
   |   @ol.   []|  	   
    |  telia   /	  	   
     |   .no  |	  	   
      \______/	  	   
  จจจจ********จจจจ 	   		  	   
It isn't my cup of tea!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]