Re: [xml] Multi-calling entities (or whatever)

On Mon, Mar 06, 2006 at 01:46:48AM +0100, Danilo Åegan wrote:
Yesterday at 11:28, Daniel Veillard wrote:
It might cause problems for xml2po as well since translations might 
want to use a different "my-entities.ent" (of course, I'd need to fix
xml2po to support "--keep-entities" as well, which is probably why I
didn't notice this sooner).

  Relying on parameter entities substitutions for localization doesn't 
sounds a good idea to me, very fragile and relies on the most complex
part of the XML-1.0 specification. For example a parser operating in 
non-validating mode of XML-1.0 is allowed to drop any declaration occuring
in the internal subset after a parameter entity reference, and will do
so without warning, fragile, very fragile ...

I agree, that's why gnome-doc-utils even uses "-e" (expand all
entities) parameter for xml2po in default document generation rules
(this is also necessary so localisation would be possible in all
cases).  But this is what users seem to be doing anyway :(

  Well preserving general (i.e. non-parameter) entities should be reliable in 
libxml2 wherever they happen, but it's an editing toolkit property, for example
other parsers based on SAX will for example loose entities when they occur
in attribute content. 


Daniel Veillard      | Red Hat
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]