XML parser error: entity not defined
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Sun Jul 01, 2012 5:31 pm
XML parser error: entity not defined
I wrote a simple XML file and a DTD file including an entity, but when I want to check it in my browsers I get the message:
XML parser error: entity not defined.
Address: file:///Users/Mike/Documents/fb.xml
Row 8, column 22
I tried to find an answer, most refer to an add-on problem with Firefox. I, however, get this message in Firefox, Chrome and Safari. (Opera doesn't give me a message, but it doesn't show the correct text replacement either.) I work on Mac OS X 10.7.
Here are my files.
DTD:
XML:
As the problem appears in all my browsers, I assume it is not a browser specific problem.
Thanks for your input.
XML parser error: entity not defined.
Address: file:///Users/Mike/Documents/fb.xml
Row 8, column 22
I tried to find an answer, most refer to an add-on problem with Firefox. I, however, get this message in Firefox, Chrome and Safari. (Opera doesn't give me a message, but it doesn't show the correct text replacement either.) I work on Mac OS X 10.7.
Here are my files.
DTD:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT example (some_list) >
<!ELEMENT some_list (item+)>
<!ELEMENT item (element1, element2)>
<!ELEMENT element1 (#PCDATA) >
<!ELEMENT element2 (#PCDATA) >
<!ENTITY entity1 "1234567890" >
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE some_list SYSTEM "Allgemeine_Entities.dtd">
<some_list>
<item>
<element1>Some Text</element1>
<element2>more Text and &entity1;</element2>
</item>
</some_list>
Thanks for your input.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XML parser error: entity not defined
Hi,
This happens because currently no web browser supports external entities.
For Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=22942
I see that at least for Firefox and Chrome there is a workaround. Declare the entities in the internal subset, in the XML.
e.g.
Regards,
Adrian
This happens because currently no web browser supports external entities.
For Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=22942
I see that at least for Firefox and Chrome there is a workaround. Declare the entities in the internal subset, in the XML.
e.g.
Code: Select all
<!DOCTYPE some_list SYSTEM "Allgemeine_Entities.dtd" [
<!ENTITY entity1 "1234567890" >
]>
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service