Kevin Flynn wrote:
> The documents I maintain using XXE include an external entity reference to a
> global configuration document. Since this document is global and also
> changes very infrequently (and in order to meet external build system
> requirements), I store it centrally on a web server together with the DTD.
> When I work offline I use XXE's catalog support to switch to a local copy of
> the DTD. Unfortunately, this mechanism works for DTDs, but not for entity
> declarations. However, I found a workaround for this which worked in the
> previous release: I included a relative entity declaration for the config
> file in the DTD instead of an absolute declaration in the document, and
> everything worked fine.
> 
> However, the new external entity support in XXE 2.4 (which is in all other
> respects wonderful as far as I am concerned) has broken this workaround
> because, although it loads my documents perfectly, it doesn't realise that
> the external entity declaration originated in the DTD, and therefore writes
> it back to the document, thus overriding the original entity declaration and
> screwing things up.
> 
> My request therefore is: is it possible to do _one_ of the following:
> 
> - recognise when external entities are declared in the DTD and refrain from
> writing them back to the document

Sorry for being so late to answer: I was in vacations for the last 2 weeks.

You have found a bug. XXE is not supposed to redeclare in the internal 
DTD subset an external entity already declared in the external subset. 
We'll fix this bug in next release.



> - _or_ extend catalog support to external entity declarations with public
> IDs, so I don't need to use this workaround

I'm not an XML catalog expert and I have not taken the time to test it 
but, to my knowledge, XXE also uses the XML catalog to resolve the URL 
of external entity declarations with public IDs.

The problem is that the user interface which is used to create a modular 
document does not allow to specify the public ID of the referenced entity.






Reply via email to