Web Design and Development Forums

Basic XML dtd help required!

This is a discussion on "Basic XML dtd help required!" within the XML, RSS & Atom section. This forum, and the thread "Basic XML dtd help required! are both part of the Program Your Website category.


Go Back   Webforumz.com > Program Your Website > XML, RSS & Atom

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Dec 19th, 2006, 11:29   #1 (permalink)
New Member
 
Join Date: Dec 2006
Location: London
Age: 24
Posts: 1
Basic XML dtd help required!

Hi all,

Im trying to construct a simple XML dtd based on a bibliography. When I try and validate the DTD I keep getting the same error message;

"XML Document must have a top level element"

Unfortunately my beginners skills have been unable to help me correct the problem so far. Any help/advice would be greatly appreciated! The dtd is below;

<?xml version="1.0"?>

<!-- Created by John Doe- K0000000 -->

<!DOCTYPE BIBLIOGRAPHY [

<!-- Address Details -->
<!ENTITY STREET "1 Bath Road">
<!ENTITY TOWN "NEWTOWN">
<!ENTITY CITY "LONDON">
<!ENTITY COUNTRY "ENGLAND">
<!ENTITY POSTCODE "KT6 HU9">

<!-- Bibliography -->
<!ELEMENT BIBLIOGRAPHY (BIB_ITEM*)>

<!ELEMENT BIB_ITEM (ADDRESS?, AUTHOR*, BOOK_TITLE?, EDITION?, EDITOR?, INSTITUTION?,
JOURNAL, DATE, ORGANIZATION?, PAGES?, PUBLISHER?, SCHOOL?, SERIES?, SERIES_TITLE?, TYPE?, VOLUME?,
URL?,ISSN?,ISBN?,ABSTRACT?,CONTENTS?)*>

<!ATTLIST BIB_ITEM
TYPE CDATA #REQUIRED
BOOK_ID ID #REQUIRED LANGUAGE CDATA #IMPLIED>
<!ELEMENT ADDRESS (#PCDATA)>
<!ELEMENT AUTHOR (#PCDATA)>
<!ATTLIST AUTHOR
FIRST_NAME CDATA #IMPLIED
LAST_NAME CDATA #IMPLIED>
<!ELEMENT BOOK_TITLE (#PCDATA)>
<!ELEMENT EDITION (#PCDATA)>
<!ELEMENT EDITOR (#PCDATA)>
<!ATTLIST EDITOR
FIRST_NAME CDATA #IMPLIED
LAST_NAME CDATA #IMPLIED>
<!ELEMENT INSTITUTION (#PCDATA)>
<!ELEMENT JOURNAL (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>
<!ATTLIST DATE
MONTH (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) #REQUIRED
YEAR CDATA #REQUIRED>
<!ELEMENT ORGANIZATION (#PCDATA)>
<!ELEMENT PAGES (#PCDATA)>
<!ELEMENT PUBLISHER (#PCDATA)>
<!ELEMENT SCHOOL (#PCDATA)>
<!ATTLIST SCHOOL SCHOOL_NAME CDATA "A University">
<!ELEMENT SERIES (#PCDATA)>
<!ELEMENT SERIES_TITLE (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT VOLUME (#PCDATA)>
<!ELEMENT URL (#PCDATA)>
<!ELEMENT ISSN (#PCDATA)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT ABSTRACT (#PCDATA)>
<!ELEMENT CONTENTS (#PCDATA)>

<!-- Page Footer -->
<!ENTITY VERSION "1.0">
<!ENTITY CREATED "19th December 2006">
<!ENTITY AUTHOR "John Doe">
<!ENTITY EMAIL "k000000@mail.com">
<!ENTITY LASTMODIFIED "20th December 2006">


]>
jmac23 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Dec 19th, 2006, 13:58   #2 (permalink)
Reputable Member
 
Join Date: Jul 2006
Location: Scotland
Age: 22
Posts: 370
Send a message via MSN to snow
Re: Basic XML dtd help required!

I think it's because your validator is trying to validate XML, not a DTD...

shove in a basic bit of XML that fits your DTD at the bottom and try again.
snow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
help required please

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Very basic MHHx New to Web Design 6 Nov 14th, 2007 06:50
Need Basic Help raptureimage Flash & Multimedia Forum 2 Jun 13th, 2007 15:54
Basic ASP xelrose99 ASP Forum 1 Mar 9th, 2005 20:24
Help with some BASIC ASP freebirdnz ASP Forum 9 Jul 15th, 2004 16:42
Help with some basic code netwarriorgizmo JavaScript Forum 3 Jul 11th, 2004 18:59



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 15:12.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59