[xml] Multi-calling entities (or whatever)
- From: danilo gnome org (Danilo Åegan)
- To: xml gnome org
- Subject: [xml] Multi-calling entities (or whatever)
- Date: Sun, 05 Mar 2006 09:37:15 +0100
Hi,
Some users[1] are complaining that xml2po doesn't give expected
results for:
my-entities.ent:
<!ENTITY testentity "something">
test.xml:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.docbook.org/xml/4.4/docbookx.dtd" [
<!ENTITY % MY-ENTITIES SYSTEM "my-entities.ent">
%MY-ENTITIES;
]>
<article>
<title>Test &testentity;</title>
</article>
If I even process it with "xmllint test.xml" (or merge translation
using xml2po, which is using libxml2), I get:
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd" [
<!ENTITY % MY-ENTITIES SYSTEM "my-entities.ent">
<!ENTITY testentity "something">
]>
<article>
<title>Test &testentity;</title>
</article>
I.e. instead of %MY-ENTITIES; entire my-entities.ent is inlined. I
understand that the resulting file has the same meaning as the
original, but is this actually expected behaviour?
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).
My libxml2 version is 2.6.21:
ii libxml2 2.6.21-0ubuntu GNOME XML library
ii libxml2-utils 2.6.21-0ubuntu XML utilities
Cheers,
Danilo
[1] http://marilyn.frields.org:8080/~paul/wordpress/?p=617
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]