This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: entity reference into entity definition
/ Camille Begnis <camille@mandrakesoft.com> was heard to say:
| Thanks for your suggestion. I already thought about it, but I find it of
| no advantage compared to one file per language.... Bigger and not easy
| for maintenance: adding a new language is painfull. :(
Examination of the SGML Standard reveals that there's no possibility to
put entity references in system or public identifier literals. And if you
don't find the marked section approach suitable, I have one more thought.
Fake it with public identifiers.
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY Lang "en" >
<!ENTITY ch-a PUBLIC "-//Camille Begnis//DOCUMENT Legal Notice//EN">
<!ENTITY ch-b PUBLIC "-//Camille Begnis//DOCUMENT whatever B is//EN">
...
]>
<book lang="⟪">
&ch-a;
&ch-b;
...
</book>
And setup a catalog file that maps
PUBLIC "-//Camille Begnis//DOCUMENT Legal Notice//EN"
"en/legal_notice_chapter.sgml">
PUBLIC "-//Camille Begnis//DOCUMENT Legal Notice//FR"
"fr/legal_notice_chapter.sgml">
etc.
When you want to switch languages, change Lang and all the //EN's
and that should be all that's required.
Not pretty, but perhaps workable :-)
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | In science, "fact" can only mean
http://www.oasis-open.org/docbook/ | "confirmed to such a degree that
Member, DocBook Editorial Board | it would be perverse to withhold
| provisional assent." I suppose
| that apples might start to rise
| tomorrow, but the possibility does
| not merit equal time in physics
| classrooms.--Stephen J. Gould