Solved

XML Validation Issue

Posted on 2009-04-05
3
474 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to create a tile layout 1 38
Send Mail Via SMTP Replacement/Rework 11 60
CSS Logo Problem. 2 7
how to avoid redundand ajax calls 5 6
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

910 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

26 Experts available now in Live!

Get 1:1 Help Now