tcrosswell
IS-IT--Management
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="1.0" encoding="UTF-8"?>
<!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
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="1.0" encoding="UTF-8"?>
<!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