The “referenced but never declared” message
February 22nd, 2005
When you save an XML file in FrameMaker 7.1, you occasionally get a message that tells you that entities such as "epsi" or "gif" or "png" have been referenced but never declared.
If this happens, close the FrameMaker file and open the XML source file in a text editor. At the top of the file you will see entity declarations such as:
<!ENTITY imagedata25 SYSTEM "images/dependencies.eps" NDATA epsi> <!ENTITY imagedata26 SYSTEM "images/directory-tree.eps" NDATA epsi> <!ENTITY imagedata27 SYSTEM "images/progress-90.eps" NDATA epsi> <!ENTITY imagedata1 SYSTEM "images/WinZip-SFU.gif" NDATA gif> <!ENTITY imagedata2 SYSTEM "images/WinZip-SFU.gif" NDATA gif> <!ENTITY imagedata3 SYSTEM "images/WinZip-SFU.gif" NDATA gif>
Each NDATA type ("epsi", "gif" etc.) should have a NOTATION declaration earlier in the file. For example:
<!NOTATION epsi PUBLIC ""> <!NOTATION gif PUBLIC ""> <!NOTATION png PUBLIC "">
If these lines are missing, add them back in and save the file. Open the file in FrameMaker and save it again. This time you should not see the message.
If you do, something a little more serious has occurred. Sometimes FrameMaker gets confused and adds hidden metadata to the file. If you follow the above instructions and you still get the "referenced but never declared" message, when you open the file in a text editor you will see that FrameMaker has removed the NOTATION lines you added.
The workaround to this problem is to copy everything from the opening <?xml version="1.0" encoding="UTF-8"?> to the end of the file and paste it into a new file. Remove the old file and save the new one in its place. Don't just copy the whole file and put everything in a new file as you may just transfer the hidden problem from the old file to the new file. Sometimes you'll notice that there are two or three weird characters at the start of the XML file. This is an indication that FrameMaker is having export problems and you should write the remainder of the document to a new file, without these junk characters.
Add the NOTATION lines back in, save the file, then try opening and saving it in FrameMaker again.
Potentially similar posts
- Scan for available IP addresses – August 2011
- Fix “No topics found” issue in CHM output – November 2010
- Use the existence of a file on the server to determine Javascript behaviour in the browser – November 2010
- Video plays locally but not on the web – August 2010
- Perl basics for beginners (on Windows) – August 2010