Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9284461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:54:33+00:00 2026-06-18T18:54:33+00:00

I’m using http://www.xmlvalidation.com/index.php to validate my DTD but it is producing errors on the

  • 0

I’m using http://www.xmlvalidation.com/index.php to validate my DTD but it is producing errors on the XML closing tags.

XML:

1   <?xml version="1.0" encoding="utf-8" ?>
2   <!DOCTYPE books SYSTEM "books.dtd">
3   <books>
4     <book title="Le Mans 24 Hours: The Official History of the World's Greatest Motor Race 1960-69" imageurl="images/1960-89.jpg">
5       <description>
6         <author>Quentin Spurring.</author>
7         <publisher>J H Haynes and Co Ltd.</publisher>
8         <publishDate>15 August 2010</publishDate>
9         <ISBN10>1844255840</ISBN10>
10        <ISBN13>9781844255849</ISBN13>
11        <blurb>Covers different races since 1923. This title also includes photographs, a race account, results data and a glorious rendering of the official race poster.</blurb>
12      </description>
13    </book>
14    <book title="Le Mans 24 Hours: The Official History of the World's Greatest Motor Race 1970-79" imageurl="images/1970-79.jpg">
15      <description>
16        <author>Quentin Spurring.</author>
17        <publisher>J H Haynes and Co Ltd.</publisher>
18        <publishDate>15 March 2011</publishDate>
19        <ISBN10>1844255395</ISBN10>
20        <ISBN13>9781844255399</ISBN13>
21        <blurb>Officially licensed with the ACO, the organisers of the annual Le Mans 24 Hours sports car race, this book covers various races since 1923.</blurb>
22      </description>
23    </book>
24  </books>

DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT books (book+)>
<!ELEMENT book (title, imageurl, description, author, publisher, publishDate, ISBN10, ISBN13, blurb)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT publishDate (#PCDATA)>
<!ELEMENT ISBN10 (#PCDATA)>
<!ELEMENT ISBN13 (#PCDATA)>
<!ELEMENT blurb (#PCDATA)>

List of errors:

    4:  129 Attribute "imageurl" must be declared for element type "book".
    4:  129 Attribute "title" must be declared for element type "book".
    12: 19  The content of element type "description" must match "null".
    13: 10  The content of element type "book" must match "(title,imageurl,description,author,publisher,publishDate,ISBN10,ISBN13,blurb)".
    14: 129 Attribute "imageurl" must be declared for element type "book".
    14: 129 Attribute "title" must be declared for element type "book".
    22: 19  The content of element type "description" must match "null".
    23: 10  The content of element type "book" must match "(title,imageurl,description,author,publisher,publishDate,ISBN10,ISBN13,blurb)".

How do you deal with closing tags in DTD’s?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:54:35+00:00Added an answer on June 18, 2026 at 6:54 pm

    This has nothing to do with closing tags. You needed to declare your attributes for book and you needed to fix your models for the book and description elements.

    New DTD

    <!ELEMENT books (book+)>
    <!ELEMENT book (description)>
    <!ATTLIST book
              title CDATA #REQUIRED
              imageurl CDATA #REQUIRED>
    <!ELEMENT description (author, publisher, publishDate, ISBN10, ISBN13, blurb)>
    <!ELEMENT author (#PCDATA)>
    <!ELEMENT publisher (#PCDATA)>
    <!ELEMENT publishDate (#PCDATA)>
    <!ELEMENT ISBN10 (#PCDATA)>
    <!ELEMENT ISBN13 (#PCDATA)>
    <!ELEMENT blurb (#PCDATA)>
    

    Note: I made the title and imageurl attributes required. You may want them implied depending on your data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am using JSon response to parse title,date content and thumbnail images and place
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.