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

Description

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

DTD


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

<!ELEMENT XXX (AAA+ , BBB)>
<!ELEMENT AAA (#PCDATA)>
<!ELEMENT BBB (#PCDATA)>

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>