Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recursive DTD

Status
Not open for further replies.

ReallyConfused

Technical User
Jun 25, 2007
1
US
This is our DTD:
<!ELEMENT container (class*, attribute*, attribute_list*, #PCDATA)>
<!ELEMENT class (name?, class*, attribute*,attribute_list*, #PCDATA)>
<!ELEMENT attribute (#PCDATA)>
<!ATTLIST attribute value CDATA #REQUIRED>
<!ATTLIST attribute attributeType CDATA #REQUIRED>

<!ELEMENT name (#PCDATA)>

<!ELEMENT attribute_list(class*, attribute*, #PCDATA) >
<!ATTLIST attribute_list attributeType CDATA #REQUIRED >

And when we try to validate some xml based on this dtd we get these errors:
node=class, error=at line number, 94: Element type &quot;attribute_list&quot; must be declared.
node=container, error=at line number, 28: Element type &quot;attribute_list&quot; must be declared.
at line number, 72: Element type &quot;attribute_list&quot; must be declared.
at line number, 81: Element type &quot;attribute_list&quot; must be declared.
node=attribute_list, error=at line number, 83: Element type &quot;class&quot; must be declared.

Is our DTD correct? If not, why not? If it is then why are we getting these errors??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top