>> English << | česky | Español | По-русски | Français | Italiano | Deutsch | MagyarZVON > Tutorials > DTD Tutorial
>> Example 4 << | Prev | Next | Contents


If an element name in DTD is followed by the plus [+], this element can occur once or several times.


The root element XXX must contain one or several elements AAA followed by precisely one element BBB. Element BBB must be always present.:


Valid documentsTop

A valid document:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> <AAA/> <BBB/> </XXX>

Several AAA elements can occur inside the document:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> <AAA/> <AAA/> <AAA/> <AAA/> <AAA/> <AAA/> <AAA/> <BBB/> </XXX>

Documents with errorsTop

Elements AAA and BBB are missing:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> ___ ___ </XXX>

At least one element AAA must be present.:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> ___<BBB/> </XXX>

Element BBB must follow element AAA:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> <BBB/> <AAA/> </XXX>

Element AAA must not follow element BBB:

 <!DOCTYPE XXX SYSTEM "tutorial.dtd">

<XXX> <AAA/> <AAA/> <AAA/> <AAA/> <BBB/> <AAA/> <AAA/> </XXX>