[xliff-tools] The Domain

Asgeir Frimannsson asgeirf at redhat.com
Sun Feb 20 15:05:42 PST 2005


On Thu, 17 Feb 2005 01:02, Bruno Haible wrote:
> 1.3 Domain
>
> This should be represented as either <group>, as proposed, or a <file>
> element for each domain. (Remember that msgfmt of a multi-domain PO file
> creates multiple MO files.) It's not yet clear to me which is better.

Yeah, I was thinking of that possibility as well, but in the draft only 
included the <group> option because:
 - 'A PO file' is the entity we're conserned about, and mapping that to 
multiple <file> elements would make back-conversion to PO tricky. If however 
the main entity was a MO file, it would be natural to map one domain to one 
<file>.

As I see it, if XLIFF support is implemented as a PO replacement in GNU 
Gettext, it would be natural to use separate <file> elements for each domain, 
but when dealing with PO, it's more natural to use <group> elements for 
domains.

> Note that PO files can contain multiple "domain" statements, and the
> same domain can be contributed to in multiple sections of the file. This is
> valid:
>
>   domain A
>    ...
>   domain B
>    ...
>   domain A
>    ...
>   domain C
>    ...
>   domain B
>    ...
>
> and is equivalent to three PO files: one for domain A, one for B, one for
> C.

This is new to me :) thanks! Would it make sense to combine these groups when 
converting to XLIFF then, and not have multiple domain <group>s with same 
resname? Eg. the above example would become in XLIFF:
<group .. resname='domain A'>...
  ... all translation units in domain A
</group>
<group .. resname='domain B'>...
  ... all translation units in domain B
</group>
<group .. resname='domain C'>...
  ... all translation units in domain B
</group>

cheers,
asgeir


More information about the xliff-tools mailing list