Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entity not recognised by Firefox

Status
Not open for further replies.

tcstom

Programmer
Aug 22, 2003
235
GB
Hi, I have an XML document which parses fine in IE but gives the following error in Firefox:

XML Parsing Error: undefined entity:
<OPTION value="Radio 1" selected="true">Radio 1 &nbsp; </OPTION>

It's pointing at &nbsp; but I do have the following line in my DTD:

<!ENTITY nbsp "&#160;">

Anyone know the problem?

Tom
emo_big_smile.gif
 
>[tt]<!ENTITY nbsp "&#160;">[/tt]
The standard declaration looks like this?
[tt]<!ENTITY nbsp CDATA "&#160;">[/tt]

 
If I add that it fails to parse in IE ('External ID is invalid' in relation to the CDATA part of that DTD line) as well as Firefox (same error as before)! Thanks for the comment, but it must be something else...

Tom
emo_big_smile.gif
 
I think in Firefox you cannot use external DTD entities, they must be inline. This is certainly true of earlier versions, but maybe later ones can.

Jon

"I don't regret this, but I both rue and lament it.
 
Oh, OK, that's rubbish! Firefox has failed me... who'd have thought it! Thanks for the advice Jon.

Tom
emo_big_smile.gif
 
Further to this, the article suggests that Firefox is designed to work this way. But does this mean that if my DTD contains entities then it must be included inline within the XML file? This isn't really convenient for my purposes... suggestions welcome.

Tom
emo_big_smile.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top