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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML1.1-Error when defined new content model for <div> element

Status
Not open for further replies.

desamsetty

Programmer
Mar 16, 2007
7
US
Hi everyone,
Any solution to my following problem is greatly appreciated.
I am trying to define a new content model for <div> element. The following is my DTD. First I am creating a parameter entity with the default xhtml1.1 DTD located at w3.org. Then I am defining a new element called "some" and adding that element to the content model of <div>.

----------MyDTD.dtd-----------------

<!ENTITY % xhtml11.dtd PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"%xhtml11.dtd;

<!ELEMENT some (#PCDATA)>
<!ATTLIST some
top CDATA #IMPLIED
>
<!ENTITY % div.content "( #PCDATA | %Flow.mix;|some)*">

-----------------end of MyDTD.dtd------------

When I create a document like the following I am getting "Content model of element div disallows element some".

-----------XHTML DOC--------
<!DOCTYPE html SYSTEM "MyDTD.dtd">
<html >
<head>
<title>Untitled Page</title>
</head>
<body>
<form id="form1" action="" >
<div ><some top=""></some>
<table>
<tr>
<td></td>
</tr>
</table>
</div>
</form>
</body>
</html>
------------END OF XHTML DOC--------

Can any one please let me know what is that I am missing here.
Thanks.
--Desamsetty.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top