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!

My First DTD (HELP)

Status
Not open for further replies.

tcrosswell

IS-IT--Management
Oct 14, 2001
26
GB
Can you help me with both parts to this question about my first DTD that I am writing.

first off, is this Valid?
<!ELEMENT img (empty)> (or even the best way of doing things)

I read that img should be empty but it says that the element empty in undefined! any help on that?


The next thing is more of a general help.
I have written this DTD (this is the complete thing) for a NEWS page on a simple site that I am creating. Do I need a DTD for each page of the site or just one big DTD?

here is my news DTD:
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!ELEMENT news (author,time,title,description,content,date,link)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT content (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT link (#PCDATA)>
<!ELEMENT img (empty)>
<!ELEMENT menu (name,link,description)>
<!ELEMENT name (#PCDATA)>

so what I have is a page that has a menu and a news section. I am more worried about how I should do the menu section (just a load of links on the left of the page is all I want) so would
<!ELEMENT menu (#PCDATA)> be enough?

Thanks for any help anyone can offer

Tom Crosswell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top