Messages per Month
|From:||Ruchi Manchanda (mru...@hotmail.com)|
|Date:||Nov 3, 2000 8:16:20 am|
I started with XML a day back. I am trying to run the following sample xml file along with the dtd document. Both the files are in the same folder.
Here is the code for sonnet.xml
<?xml version="1.0"?> <!DOCTYPE sonnet SYSTEM "sonnet.dtd"> <sonnet type="Shakespearean"> <author> <last-name>Shakespeare</last-name> <first-name>William</first-name> <nationality>British</nationality> <year-of-birth>1564</year-of-birth> <year-of-death>1616</year-of-death> </author>
<text> <line>My mistress eyes are nothing like sun,</line> <line>Coral is far from red than her lips.</line> <line>If snow...</line> <line> If hairs be wire,..</line> <line>I have seen </line> <line>But no such roses</line> <line>And in some</line> <line>Than in the</line> </text> </sonnet>
Following is the code for sonnet.dtd
<! ELEMENT sonnet (author, title?,text) > <! ATTLIST sonnet type (Shakespearean | Petrarchan) "Shakespearen")>
<! ELEMENT text(line, line, line, line, line, line, line, line) >
<! ELEMENT author (last-name, first-name, nationality, year-of-birth?, year-of-death?) >
<! ELEMENT title (#PCDATA)> <! ELEMENT last-name (#PCDATA)> <! ELEMENT first-name (#PCDATA)> <! ELEMENT national (#PCDATA)> <! ELEMENT year-of-birth (#PCDATA)> <! ELEMENT year-of-death (#PCDATA)> <! ELEMENT line (#PCDATA)>
When I try to run sonnet.xml using IE version 5.0 browser it gives me the following error :
The system cannot locate the resource specified. Error processing resource 'sonnet.dtd'. Line 2, Position 38
<!DOCTYPE sonnet SYSTEM "sonnet.dtd">
I would appreciate your help and responses.
_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at http://profiles.msn.com.