DTD compliance (was Re: Another Doc issue)



On Sat, Aug 05, 2000 at 08:28:08PM +0200, Karl Eichwalder wrote:
> Ali Abdin <aliabdin@aucegypt.edu> writes:
> 
> > in gdiskfree.xml and gdiskfree.sgml you have:
> > <menuchoice>
> > 	<shortcut><keysym>Ctrl-q</keysym>
> >         </shortcut>
> >         <guimenuitem>Exit</guimenuitem>
> > </menuchoice>
> > 
> > read the ASSUMPTIONS file of gnome-db2html2 (I will quote it for you):
> > 
> > DOCBOOK doesn't care about these, but I do.
> 
> It cares; SGML DTD:
> 
> <!ELEMENT MenuChoice - - (Shortcut?, (GUIButton|GUIIcon|GUILabel
> 		|GUIMenu|GUIMenuItem|GUISubmenu|Interface)+)>
> 
> XML DTD:
> 
> <!ELEMENT menuchoice (shortcut?, (guibutton|guiicon|guilabel
> 		|guimenu|guimenuitem|guisubmenu|interface)+)>
> 
> Thanks for the pointer.  Obviously, gdiskfree.* were not verified ;)
> 

Karl - I think you misunderstand. The way I originally wrote it:


		<menuchoice>
		  <shortcut><keysym>Ctrl-q</keysym>
		</shortcut>
		<guimenuitem>Exit</guimenuitem>
	      </menuchoice>

complies with the DTD.

The noncomplying text was the way JRB's "ASSUMPTIONS" file asks us to write it:

<menuchoice>
 <guimenuitem>Quit</guimenuitem>
 <shortcut>
    <keysym>Ctrl-q</keysym>
 </shortcut>
</menuchoice>

with the <guimenuitem> ahead of the <shortcut>:

nsgmls:gdiskfree.xml:137:18:E: document type does not allow element "shortcut" here


The first way, the way I wrote it, parses. The second way, as JRB's
gnome-db2html wants us to write it, does not.

Ali, I think we need to be writing valid docbook here. What problem
does my original way cause in the display?

-- 
John Fleck
jfleck@inkstain.net (h)
jfleck@abqjournal.com (w)
http://www.inkstain.net/fleck/
http://www.abqjournal.com/scitech/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]