OASIS XML Localisation Interchange File Format (XLIFF) TC

 View Only
  • 1.  Processing requirements when re-segmenting

    Posted 11-05-2012 13:13
    Hi all, One of the most difficult aspects of our processing requirements is to define what happened when a unit is re-segmented. We need to make sure we have an expected behavior for each element and attribute that is affected. I would see that defined by a general set of processing requirements in the section 2.8.3 Segmentation Modification that describes the generic behavior for the user agents supporting only the core. And complement it as needed on the different elements/attributes. I've tried to come up with an initial list. I'm sure it needs work: -- When merging, joining, or moving <segment> or <ignorable> elements, the user agent MUST update, add or remove the order attributes of the <target> elements as needed. -- When merging two segments: - the user agent MUST remove all the children elements of both <segment> elements, except <source>, <target> and <notes>, and except the elements it supports and for which there are specific processing requirements. - the id value of the merged segment MUST be the one of the left segment. - the state value of the merged segment MUST be: - if both segments have the same value: that same value - they have different values: the value corresponding to the least advanced state of the two. - the subState value of the merged segment MUST be: - if both segments have the same value: that same value - if they have different values: the value of the subState attribute that is in the segment where the state attribute has the least advanced state. - the translate attribute of the merged segment MUST be: - if both segments have the same value: that same value - they have different values: the value 'yes'. - the approved attribute of the merged segment MUST be: - if both segments have the same value: that same value - they have different values: the value 'no'. - the xml:space attribute of the merged <source> element MUST be: - if both segments have the same value: that same value - they have different values: the value 'preserve'. - the xml:space attribute of the merged <target> element MUST be: - if both segments have the same value: that same value - they have different values: the value 'preserve'. - the dir attribute of the merged <source> element MUST be: - if both segments have the same value: that same value - they have different values: the value of the left <source> element. - the dir attribute of the merged <target> element MUST be: - if both segments have the same value: that same value - they have different values: the value of the left <target> element. - for any other attribute in the segment, the source or the target elements, the attribute of the merged element MUST be: - if both original elements have the same value: that same value - they have different values: the attribute MUST be removed, except for the attribute the user agent supports and for which there are other processing requirements. For example, given the following unit: <unit id='1'> <segment id='1' state='final' subState='xyz:QAed'> <source>Part 1; </source> <target>Partie 1 ; </target> <mt:matches> <mt:match similarity='0.98'> <source>Part 1</source> <target>Partie 1</target> </mt:match> </mt:matches> <md:metadata> <md:meta type='xyz:QAres'>99</md:meta> </md:metadata> </segment> <segment id='2' state='translated' subState='xyz:toICR'> <source>Part 2.</source> <target>Partie 2</target> <mt:matches> <mt:match similarity='0.99'> <source>Part 2</source> <target>Partie 2</target> </mt:match> </mt:matches> </segment> </unit> Merging both segments using a user agent supporting only the core would give: <unit id='1'> <segment id='1' state='translated' subState='xyz:toICR'> <source>Part 1; Part 2.</source> <target>Partie 1 ; Partie 2</target> </segment> </unit> -- When splitting a segment: - the user agent MUST discard in both new segments all the children elements of both segments, except <source> and <target>, and except the elements it supports and for which there are specific processing requirements. - the left segment MUST keep all the attribute of the initial segment. - the id value of the right segment MUST be a new value not yet used in any segments of that unit element. - the state, subState, translate and approved attributes of the right segment MUST be the same as the ones of the initial segment. - any other attribute of the original segment MUST be discarded in both left and right segments, except if that attribute is supported by the user agent and has other processing requirements. Regards, -yves


  • 2.  RE: [xliff] Processing requirements when re-segmenting

    Posted 11-05-2012 18:19
    Hi, There are special cases to consider: 1) splitting a <segment> element that starts or ends with an inline tag for storing the tag in an <ignorable> element. Attributes that go to the <ignorable> need element a different treatment (there is no "approved" attribute, for example). 2) Merging a <segment> element with an <ignorable> element to produce a larger<segment>. The "id" attribute may be set to the value of the <segment> part. The "state" attribute may remain the same. Regards, Rodolfo -- Rodolfo M. Raya rmraya@maxprograms.com Maxprograms http://www.maxprograms.com >


  • 3.  RE: [xliff] Processing requirements when re-segmenting

    Posted 11-05-2012 21:08
    Good points Rodolfo. We'll need to add those too. Thanks, -ys