1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
This directory contains GnuCash specific DTD files.
1. Files
(1) gnc-docbookx.dtd
GnuCash common language neutral DTD file. Version information, URLs, application names, and so on.
(2) gnc-gui-struct.dtd
All entities of the GUI are defined in this file. For example,
<!ENTITY gm.file "%gm.file"> or
<!ENTITY mc.fi.open "<menuchoice><shortcut><keycombo>&kc.ctrl;<keycap>O</keycap></keycombo></shortcut>&gm.file;&gmi.fi.open;</menuchoice>">.
The differences among general entities, parameter entities (%), and
external entities are described in
https://www.w3.org/TR/REC-xml/#sec-physical-struct.
(3) gnc-gui-${LANG}.dtd
All language specific entities are stored in the localized files.
The original English and the translated entities should be defined in UTF-8 in this file.
For German example, filename is gnc-gui-de.dtd. A translated entity for %gm.file; is:
<!ENTITY % gm.file "<guimenu><accel>D</accel>atei</guimenu>">.
You must only translate parameter entities. They are with % in ENTITY definitions.
If you don't translate some parameter entities, English entities are used instead.
2. Usage
Specify gnc-gui-${LANG}.dtd file in DOCTYPE declarations for each docbook xml file.
For Japanese example, you have to use
<!DOCTYPE book SYSTEM "gnc-gui-ja.dtd">.
The Import order is as follows:
gnc-gui-${LANG}.dtd --> gnc-gui-C.dtd --> gnc-gui-struct.dtd --> gnc-docbookx.dtd --> PUBLIC docbook 4.5 docbookx.dtd
Extensible Markup Language (XML) 1.0 (Fifth Edition)
4.2 Entity Declarations
https://www.w3.org/TR/REC-xml/#sec-entity-decl
says
'''
The Name identifies the entity in an entity reference or, in the case of an unparsed entity, in the value of
an ENTITY or ENTITIES attribute. If the same entity is declared more than once, the first declaration encountered
is binding; at user option, an XML processor may issue a warning if entities are declared multiple times.
"""
|