← Prev in month ← Prev in thread

XLIFF and ITS mapping- Elements within text

From
Soroush.Saadatfar <>
Date
2015-12-18T17:09:43+00:00
ID
Thread
XLIFF and ITS mapping- Elements within text
Hi all!

Below is the suggested text to be a part of 2.1 spec for mapping elements within text data category of ITS 2.0 in XLIFF 2.1.

Please have a review and provide your feedback/comments.

Best,

Soroush.

  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
  
  
   
   
   
   
   
   
   
   
   
   
   
  

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 

Elements Within Text

Represented by
withinText
attribute in ITS 2.0 which has one of the 3 following values;

 

1- ‘yes’: Indicates that
 the inline element and its content are both part of the parent element’s flow. In this case, the element should be replaced by the following native XLIFF 2.1 inline elements:
<pc>, <sc>/<ec> and
<ph>, while its content remains in the original data;

 

Using <pc>:

<body>

   <p>This paragraph contains <span its-within-text=”yes”>a spanned 

      part</span>.</p>

</body>

 

Representation in XLIFF 2.1:

<unit id="u1">

   <originalData>

      <data id="d1">&lt;span&gt;</data>

      <data id="d2">&lt;/span&gt;</data>

   </originalData>

   <segment>

      <source>This paragraph contains <pc id="pc1" dataRefStart="d1"

              dataRefEnd="d2">a spanned part </pc>.

      </source>

   </segment>

</unit>

 

Using <sc>/<ec>:

<body>

   <p>A paragraph where <u>the formatted text appears in more than one 

      segment. The second sentence here.</u></p>

</body>

 

Representation in XLIFF 2.1:

<unit id="u1">

   <originalData>

      <data id="d1">&lt;u&gt;</data>

      <data id="d2">&lt;/u&gt;</data>

   </originalData>

   <segment>

      <source>A paragraph where <sc id="sc1" dataRef=”d1” type="fmt"

              subType="xlf:u"/>the formatted text takes more than one

              segment.  

      </source>

   </segment>

   <segment>

      <source> The second sentence here.<ec dataRef=”d2” 

              startRef="sc1"/>

      </source>

   </segment>

</unit>

 

 

Using <ph>:

<body>

   <p>This sentence has a breakpoint<br/>inside.</p>

</body>

 

Representation in XLIFF 2.1:

<unit id="u1">

   <originalData>

      <data id="d1">&lt;br/&gt;</data>

   </originalData>-->

   <segment>

      <source>This sentence has a breakpoint<ph id="ph1" dataRef="d1" 

              type=”fmt” subType=”xlf:lb”/>inside.

      </source>

   </segment>

</unit>

 

2- ‘nested’: This value
 is used when the element itself does not break the flow of its parent element, but its content represents an independent dataflow. To handle this case in XLIFF 2.1, the sub-flow (i.e. element’s content) should be stored in a different
<unit> while the original element is replaced by a
<ph> element and order of the flow defined by the
subFlows attribute.  

 

<body>

   <p>This paragraph has a textarea embeded textarea; <textarea 

      name="Additional Information">Add content    

      here...</textarea>.</p>

</body>

Representation in XLIFF 2.1:

<unit id="u1">

   <segment>

      <source>Additional Information</source>

   </segment>

</unit>

<unit id="u2">

   <segment>

      <source>Add content here...</source>

   </segment>

</unit>

<unit id="u3">

   <segment>

      <source>This paragraph has a textarea embeded textarea; <ph 

              id="ph1" subFlows="u1 u2"/></source>

   </segment>

</unit>

All the sub-flows and the
<unit> element which invokes them must be in the same
<file> element.

 

3- ‘no’: Indicates that
 the element and its content are not part of the parent element’s flow. In XLIFF 2.1 such element and its parent element should be stored in separate
<unit> elements.

 

<body>

   <ul>

      <li>First sentence</li>

      <li>Second sentence</li>

   </ul>

</body>

 

Representation in XLIFF 2.1:

<unit id="u1">

   <segment>

    <source>First sentence</source>

   </segment>

  </unit>

  <unit id="u2">

   <segment>

    <source>Second sentence</source>

   </segment>

</unit>
← Prev in month ← Prev in thread