2
我想用http://www.xmlvalidation.com/驗證XML和DTD DTD,但在處理DTD了錯誤。我添加了dtd,但它不起作用。我不知道缺少什麼。我將這兩個文件複製並粘貼到一個頁面上(沒有使用外部)。 謝謝!如何驗證XML和在線資源
<Bookstore>
<Book ISBN = "ISBN-101" Price = "100" Authors = "JU JW">
<Title>
Introduction to Python
</Title>
</Book>
<Book ISBN = "ISBN-202" Price = "120" Authors = "HG JU JW">
<Title>
Digital Circuit Design
</Title>
<Remark>
Amazon.com says: Buy this book bundled with
<BookRef book = "ISBN-303" /> - a great deal!
</Remark>
</Book>
<Author Ident = "HG">
<Firstname>Hector</Firstname>
<Lastname>Garcia</Lastname>
</Author>
<Author Ident = "JU">
<Firstname>Jeffrey</Firstname>
<Lastname>Ullman</Lastname>
</Author>
<Author Ident = "JW">
<Firstname>Jennifer</Firstname>
<Lastname>Widom</Lastname>
</Author>
<!ELEMENT Bookstore(Book*, Author*)>
<!ELEMENT Book (Title, Remark?)>
<!ATTLIST Book ISBN ID #REQUIRED
Price CDATA #REQUIRED
Authors IDREFS #REQUIRED>
<!ELEMENT Title(#PCDATA)>
<!ELEMENT Remark(#PCDATA | BookRef)*>
<!ELEMENT BookRef EMPTY>
<!ATTLIST BokkRef book IDREF #REQUIRED>
<!ELEMENT Author(Firstname,Lastname)>
<!ATTLIST Author Ident ID #REQUIRED>
<!ELEMENT Firstname(#PCDATA)>
<!ELEMENT Lastname(#PCDATA)>