OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xliff] Extensibility methods


Hi David,

> Yves, how could <metaHolder> be used to define unique
> characteristics about particular inline XLIFF tags
> contained in the translatable text?

We do have a requirement for this in the inline markup requirement (4.5. "Must allow to associate spans of content with metadata").

I think it is an important one, and we need a solution for it to allow XLIFF to work in today's environment. A lot of tools do associate extra metadata with spans of content.

I see two ways to do it (regardless of their merits):

- with custom namespace you could have attributes in a custom namespace.
- with both custom namespaces and metaHolder we could somehow link an inline code or marker with an element (e.g. meta, or metaHolder, or a custom element) using an ID of some sort.

For example, using metaHolder, maybe something like:

<unit id=”a1”>
 <segment>
   <source> The password for user <x id="1"/> was last modified on <x id="2"/> and must be changed by <x id="3"/>.</source>
  <m:metaHolder>
   <m:meta type="variable" inlineRef="1">user variable info</m:meta>
   <m:meta type="variable" inlineRef="2">date1 variable info</m:meta>
   <m:meta type="variable" inlineRef="3">date2 variable info</m:meta>
  </m:metaHolder>
 </segment>

Depending on what the actual information to attach is, this example may be a bad one: For instance if the info is just some text representation of the variable we should use the proper XLIFF mechanism for this rather than a custom extension, so the disp attribute probably.

But regardless of the example, the principle would be the same.

Another way, that Rodolfo suggested, would be to have some form of offset information that would allow to link the metadata and the span, without using markers in the content. Something like this:

<unit id=”a1”>
 <segment>
   <source> The password for user <x id="1"/> was last modified on <x id="2"/> and must be changed by <x id="3"/>.</source>
  <m:metaHolder>
   <m:meta type="variable" offset="24:1">user variable info</m:meta>
   <m:meta type="variable" inlineRef="47:1">date1 variable info</m:meta>
   <m:meta type="variable" inlineRef="72:1">date2 variable info</m:meta>
  </m:metaHolder>
 </segment>

Here I assumed each code would be counted as one char, and since the info applies only to the code its length is 1 char.

This method has many advantages, but also some majors drawbacks like making any manual edit basically impossible, or making it very hard for XML tools like XSLT to work efficiently (they would work a lot better with markers)

I'm sure there are other ways and variations of those to link the content with the metadata.

The important part is that we take this requirement into account when deciding between a metaHolder-type of representation or custom namespaces.

Cheers,
-yves




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]