• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

XML Validation Issue

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
catonthecouchproductions
Asked:
catonthecouchproductions
1 Solution
 
hieloCommented:
>>..."Storm.bmp NDATA

You missed the closing double quotation mark BEFORE NDATA
0
 
catonthecouchproductionsAuthor Commented:
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
 
Geert BormansCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now