[Po4a-devel]Unrecognized prolog inclusion entity

Martin Quinson martin.quinson at loria.fr
Sat Jul 23 06:24:39 UTC 2005


On Fri, Jul 01, 2005 at 12:01:10PM +0200, Francois Gouget wrote:
> 
> 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.

I don't really understand why it worked with an old version of po4a.
Moreover, I see in the changelog:

po4a (0.17.2-1) unstable; urgency=low

  - [sgml] Allow %entities; in prolog, even if they are the evil incarned on
    earth. Damn it, it wasn't easy. Fixes Alioth's #300710.

So, well. I guess it didn't work *right* with 0.16.2 (or I'm an idiot, which
is also quite possible).

Now, for the fix, I think I have it right in my local copy, but I'm not sure
since I didn't tested it throughfully. Your feedback is naturally highly
welcomed on this :)

Bye, Mt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/po4a-devel/attachments/20050723/383574c5/attachment.pgp


More information about the Po4a-devel mailing list