I have an SGML file which essentially does this:
<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY % foo "INCLUDE">
<![ %foo; [
<!entity some-chapter SYSTEM "some-chapter.sgml">
]]>
]>
...
And this triggers the 'unrecognized prolog inclusion entity' error at
line 539 of Sgml.pm.
Now, before you ask, this document is in fact generated automatically
and the 'foo' entity is either set to 'INCLUDE' or 'IGNORE'
depending on
what we want to do with the generic document, and the idea behind the
conditional include is to not include sgml files we will not use.
This works fine with DocBook and it worked fine with Po4a 0.16.2.
So I tried to understand why it does not work with the current Po4a code
and I came to the conclusion that putting conditional sections in the
prolog is simply not supported by the current code. Did I come to the
correct conclusion? Would it be easy to fix?
The alternative is to remove the conditional sections from the prolog.
That fixes the Po4a error and I think it should not cause other issues.
But I'd prefer to fix/improve po4a if possible.
--
Francois Gouget
fgouget(a)codeweavers.com