Bug #5022
closedThe entity "nbsp" was referenced, but not declared
0%
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
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.
Updated by O'Neil Delpratt about 2 years ago
- Status changed from New to Rejected
Please register to edit this issue