I'm trying to load XML files from the PHP repository of the online documentation. It's by the DocBook standard.
However, when I load an XML file I get errors like:
Warning: DOMDocument::load(): Entity 'reftitle.intro' not defined
I somewhat understand that error, but I'm having problems to fix it. I tried with the external entities loader callback (libxml_set_external_entity_loader
) but it's only called once, for the file itself.
So somehow I think I need to tell DOMDocument either a) to ignore those undefined entities or b) to provide these entities.
There is a file named language-defs.ent
which contains all these entities like inside a DTD, e.g.:
<!ENTITY reftitle.intro '<title xmlns="http://docbook.org/ns/docbook">Introduction</title>'>
But I don't know how to make use of that. Maybe it's just the time of the day.