Receiving XML error when Validating with xmllint

dexter4000

New Member
When I use xmllint to check my DTD file I get an error message. Please see the output below. I'm not exactly sure where this has all gone wrong.\[code\]book.dtd:1: parser error : StartTag: invalid element name<!ELEMENT books_for_sale (book+)> ^book.dtd:1: parser error : Extra content at the end of the document<!ELEMENT books_for_sale (book+)> ^\[/code\]Here is my DTD file\[code\]<!ELEMENT books_for_sale (book+)><!ELEMENT book (book_id, title, author, co_author_name, editor_name, illustrator_name, language, ISBN, publisher, publisher_date, genre, subject, category, file_size, pages, price, payment_method)><!ELEMENT book_id (#PCDATA)><!ELEMENT title (#PCDATA)><!ELEMENT author (#PCDATA)><!ELEMENT co_author_name (#PCDATA)><!ELEMENT editor_name (#PCDATA)><!ELEMENT illustrator_name (#PCDATA)><!ELEMENT language (#PCDATA)><!ELEMENT ISBN (#PCDATA)><!ELEMENT publisher (#PCDATA)><!ELEMENT publisher_date (#PCDATA)><!ELEMENT genre (#PCDATA)><!ELEMENT subject (#PCDATA)><!ELEMENT category (#PCDATA)><!ELEMENT file_size (#PCDATA)><!ELEMENT pages (#PCDATA)><!ELEMENT price (#PCDATA)><!ELEMENT payment_method (#PCDATA)>\[/code\]Not sure if the combination of html and xml is done properly. Tried using Namespaces to keep this sorted out. But this is all new to me so I'm not sure if it's written correctly.\[code\]<?xml version="1.0" encoding="utf-8"?><!DOCTYPE books_for_sale SYSTEM "book.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:BO="http://resumator3000.com"><!-- list book inventory --><head><title>Book Order</title><link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/15870054/book.css"></link></head><body><div class="page-wrap"><h3>Books for Sale</h3><h4>Great Prices! Limted Selection! No Delivery!</h4><!-- present books for sale --><BO:books_for_sale> <BO:book> <p>Book ID: <BO:book_id>BK12345</BO:book_id></p> <p>Book Title: <BO:title>Gray Geese Crying</BO:title></p> <p>Author: <BO:author>Bill Nedham</BO:author></p> <p>Co-Author: <BO:co_author_name>Surely Joking</BO:co_author_name></p> <p>Editor: <BO:editor_name>Fried Brian</BO:editor_name></p> <p>Illustrator: <BO:illustrator_name>Drew Sumthin</BO:illustrator_name></p> <p>Language: <BO:language>Orangatang</BO:language></p> <p>ISBN: <BO:ISBN>9912385748391</BO:ISBN></p> <p>Publisher: <BO:publisher>Random Random Homes</BO:publisher></p> <p>Publish Date: <BO:publisher_date>2001</BO:publisher_date></p> <p>Genre: <BO:genre>Poetry</BO:genre></p> <p>Subject: <BO:subject>Human Mind</BO:subject></p> <p>Category: <BO:category>Self-Help</BO:category></p> <p>File Size: <BO:file_size>122 MB</BO:file_size></p> <p>Pages: <BO:pages>3</BO:pages></p> <p>Price: <span id="dollar">$</span><BO:price>142.99</BO:price></p> <p>Payment Method: <BO:payment_method>Paypal</BO:payment_method></p> </BO:book> </BO:books_for_sale></div></body></html>\[/code\]Not sure where this has gone wrong.
 
Top