[xliff-tools] Re: [The XLIFF Tools project wiki] Update of
"Projects/XliffPoGuideDraft2"
Asgeir Frimannsson
asgeirf at redhat.com
Mon Apr 11 10:01:03 EST 2005
Rodolfo,
In reference to the 'name' attribute of <context-group>, I believe this only
need to be unique *within the trans-unit* and not across trans-unit elements.
The spec is a little unclear here, saying "The required name attribute
uniquely identifies the <context-group> within the file." That doesn't mean
you can't have two <context-group> elements with the same name, as this would
make it impossible to override context information (from the spec: Because
the <context-group> element may occur at a very high level, a default context
can be established for all <trans-unit> elements within a file. This default
can be overridden at many subsequent levels.)
Let's take an example:
<group>
<trans-unit id='#1'>
<source>hello world</source>
<context-group name='mycontext'>
<context type='x-example'>Overridden Context</context>
</context-group>
</trans-unit>
<trans-unit id='#2'>
<source>hello world</source>
</trans-unit>
<context-group name='mycontext'>
<context type='x-example'>Standard Context</context>
</context-group>
</group>
Here #2 inherits the context of the <group>, but #1 overrides the group
context. This would not be possible without having the same name for the two
context-group elements?
So I think we should revert the latest change in the PO Guide.. Any thoughts?
cheers,
asgeir
> The following page has been changed by RodolfoRaya:
> http://xliff-tools.freedesktop.org/wiki/Projects_2fXliffPoGuideDraft2
>
> The comment on the change is:
> Noted that references and auto-comments must have unique names
>
> ---------------------------------------------------------------------------
>--- <source xml:space="preserve">untranslated-string</source>
> - <context-group name="x-po-entry-header" purpose="information">
> + <context-group name="x-po-entry-header#1" purpose="information">
> <context context-type="x-po-autocomment">auto-comment-text</context>
> </context-group>
> </trans-unit>
> <trans-unit id="##2">
> <source xml:space="preserve">untranslated-string</source>
> - <context-group name="x-po-entry-header" purpose="information">
> + <context-group name="x-po-entry-header#2" purpose="information">
> <context context-type="x-po-autocomment">auto-comment-text-line1
> auto-comment-text-line2</context>
> </context-group>
> </trans-unit>
> }}}
> +
> + Each context group must have a different name. The filter must ensure
> uniqueness.
>
> ==== Reference ====
>
> @@ -306, +308 @@
> </context-group>
> </trans-unit>
> }}}
> +
> + As noted in previous section, each context group must have a different
> name and the conversion tool must ensure uniqueness.
>
> ==== Fuzzy Flag ====
More information about the xliff-tools
mailing list