Solved

XML Validation Issue

Posted on 2009-04-05
3
467 Views
Last Modified: 2012-05-06
Hello,

I am getting the following error when I try to validate the attached XML file.

File name:              Nonexistent
Column:              17
Error:              Declaration for entity "Storm" must end with '>'.
            
 Error Position:              <League LName="Eastern Developmental League">

Can anyone please help? I have tried everything.

The XML and DTD code is below.

Thanks
Ryan
<?xml version="1.0" standalone="no" ?>
 
 

<!DOCTYPE League SYSTEM "DL.dtd"[
 

<!ENTITY Tigers SYSTEM "Tigers.bmp" NDATA Graphics>

<!ENTITY Raiders SYSTEM "Raiders.bmp" NDATA Graphics> 

<!ENTITY Storm SYSTEM "Storm.bmp NDATA Graphics>
 

]>
 

<League LName="Eastern Developmental League">

   <Team>

      <Team_Name>Tigers</Team_Name>

      <City>Toledo</City>

      <Logo Source="Tigers"/>

      <Players>

         <Player Position="Centers" PPG=" 21.2" RPG="11.1">Lionel Diggs</Player>

         <Player Position="Forward" PPG="18.9" RPG="8.4">Andrew Case</Player>

         <Player Position="Forward" PPG="14.4" RPG="5.0">Casey Lewis</Player>

         <Player Position="Guard" PPG="15.4" RPG="3.1" Assists="9.4">Andrew Case</Player>

         <Player Position="Guard" PPG="7.2" RPG="2.5" Assists="3.9">Ray Kee</Player>

      </Players>

   </Team>

   <Team>

      <Team_Name>Raiders</Team_Name>

      <City>Central City</City>

      <Logo Source="Raiders"/>

      <Players>

         <Player Position="Center" PPG="17.2" RPG="14.2">David Thesus</Player>

         <Player Position="Forward" PPG="28.3" RPG="7.0">Troy Thompson</Player>

         <Player Position="Forward" PPG="10.4" RPG="5.3">Gary Coles</Player>

         <Player Position="Guard" PPG="19.2" RPG="5.2" Assists="4.4">Michael Burns</Player>

         <Player Position="Guard" PPG="5.1" RPG="2.1" Assists="12.9">Patrick Dawson</Player>

      </Players>

   </Team>

   <Team>

      <Team_Name>Lightning</Team_Name>

      <City>Philadelphia</City>

      <Players>

         <Player Position="Center" PPG="12.2" RPG="14.2">Tim White</Player>

         <Player Position="Forward" PPG="21.7" RPG="7.8">Michael Keyes</Player>

         <Player Position="Forward" PPG="8.4" RPG="9.4">Bobby Phillips</Player>

         <Player Position="Guard" PPG="13.1" RPG="1.4" Assists="10.3">David Rice</Player>

         <Player Position="Guard" PPG="10.2" RPG="4.1" Assists="8.4">Elroy Watson</Player>

      </Players>

   </Team>

   <Team>

      <Team_Name>Hoopsters</Team_Name>

      <City>Hill County</City>

      <Players>

         <Player Position="Center" PPG="36.8" RPG="14.8">Tim Brubeck</Player>

         <Player Position="Forward" PPG="13.9" RPG="7.2">Steve True</Player>

         <Player Position="Forward" PPG="5.2" RPG="7.9">David Dannon</Player>

         <Player Position="Guard" PPG="12.4" RPG="5.8" Assists="7.3">Kevin Cleveland</Player>

         <Player Position="Guard" PPG="9.5" RPG="6.2" Assists="12.3">Doug Kaufman</Player>

      </Players>

   </Team>

   <Team>

      <Team_Name>Jaguars</Team_Name>

      <City>Jersey City</City>

      <Players>

         <Player Position="Center" PPG="9.4" RPG="15.1">Scott Plank</Player>

         <Player Position="Forward" PPG="24.1" RPG="8.1">Bill Avidman</Player>

         <Player Position="Forward" PPG="10.2" RPG="8.7">Dan Smith</Player>

         <Player Position="Guard" PPG="24.8" RPG="2.9" Assists="9.7">Brett Dickson</Player>

         <Player Position="Guard" PPG="8.1" RPG="6.7" Assists="8.8">Paul Thompson</Player>

      </Players>

   </Team>

   <Team>

      <Team_Name>Storm</Team_Name>

      <City>Rockaway</City>

      <Logo Source="Storm"/>

      <Players>

         <Player Position="Center" PPG="21.4" RPG="14.8">Tom Jay</Player>

         <Player Position="Forward" PPG="16.8" RPG="8.7">Alan Jackson</Player>

         <Player Position="Forward" PPG="8.4" RPG="7.8">Alan Jones</Player>

         <Player Position="Guard" PPG="19.2" RPG="1.8" Assists="14.3">Kevin Browne</Player>

         <Player Position="Guard" PPG="14.8" RPG="5.1" Assists="7.2">Ian Larson</Player>

      </Players>

   </Team>

</League>
 
 
 

---------
 

DTD file below
 

<!ELEMENT League (Team+)>

<!ATTLIST League LName CDATA #IMPLIED>

	<!ELEMENT Team (Team_Name, City, Logo, Players+)>

		<!ELEMENT Team_Name (#PCDATA)>

		<!ELEMENT City (#PCDATA)>

		<!ELEMENT Logo EMPTY>

		<!ATTLIST Logo Source CDATA #REQUIRED>

		<!ELEMENT Players (Player, Player, Player, Player, Player)>

			<!ELEMENT Player (#PCDATA)>

				<!ATTLIST Player Position CDATA #REQUIRED>

				<!ATTLIST Player PPG CDATA #IMPLIED>

				<!ATTLIST Player RPG CDATA #IMPLIED>

				<!ATTLIST Player Assists CDATA #IMPLIED>

				

<!NOTATION Graphics SYSTEM "Paint.exe">

Open in new window

0
Comment
3 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 24073839
>>..."Storm.bmp NDATA

You missed the closing double quotation mark BEFORE NDATA
0
 
LVL 1

Author Comment

by:catonthecouchproductions
ID: 24074010
Wow, something so simple.

Now using this validator

http://www.validome.org/xml/validate/

I get the error

      The Document `DL.dtd` could not load!

Help?

Thanks
R
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 24075012
Well, that is not your only problem,
there are some issues with the DTD in relation to your XML.
I assume that you are developing the XML and the DTD yourself.
make the team line
<!ELEMENT Team (Team_Name, City, Logo?, Players+)>
since not all Tealms have a logo yet
about
<!ELEMENT Players (Player, Player, Player, Player, Player)>
is that really just 5, or can you use Player+

I have tried the validator service you are using,
I can't seem to find a way to link the DTD to the XML,
I have tried every possible syntax I have ever encountered for that
I need to go out and dig the forum to find a way, if at all possible.

Can I recommend using an IDE for DTD development?
use www.oxygenxml.com
you can test drive that for a while, I bet that once you used it you will like it
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now