Project

Profile

Help

Bug #5022

closed

The entity "nbsp" was referenced, but not declared

Added by O'Neil Delpratt almost 3 years ago. Updated about 2 years ago.

Status:
Rejected
Priority:
Normal
Category:
PHP API
Start date:
2021-06-11
Due date:
% Done:

0%

Estimated time:
Found in version:
1.2.1
Fixed in version:
Platforms:

Description

A user has reported an issue in Saxon/C PHP where they cannot reference the entity file to the Schema Validator. See report here: https://stackoverflow.com/questions/67935660/saxon-php-xml-schema-validation-with-entity-reference

Actions #1

Updated by Michael Kay almost 3 years ago

I'm afraid O'Neil and I both barked up a lot of wrong trees before realising this is a simple user error. The DTD has

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE section [
<!ENTITY % ent1 SYSTEM "isonum.ent">
]>

which declares a parameter entity ent1 but never references it. If you want to expand the DTD to include the declarations contained in the parameter entity, you need to expand the parameter entity by referring to it, that is:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE section [
<!ENTITY % ent1 SYSTEM "isonum.ent">
%ent1;
]>

With this change, the problem goes away.

I'm afraid we're getting rusty on remembering how DTDs work - we don't use them very often these days, partly because so many XML parsers don't support them fully.

Actions #2

Updated by O'Neil Delpratt about 2 years ago

  • Status changed from New to Rejected

Please register to edit this issue

Also available in: Atom PDF