Wiki

Clone wiki

Okapi / ExploringMarkupFormats

Some Terminology

Translatable Content: Content that require linguistic processing

Localisable Content: Content that may require localisation, but is not of a linguistic nature

Non-Localisable Content: Content that is not localisable or translatable

Handling Elements

Simple-content elements

Elements with only Text children.

Simple-content elements with translatable content

<pre>this element contains only text</pre>

Okapi Representation:

<text-unit id='1' restype='xml-element-simple' x:type='element' x:name='pre'>
  <content>this element contains only text</content>
</text-unit>

Simple-content elements with localisable content

<doStuff>true</doStuff>

Okapi Representation:

<loc-unit id='1' restype='xml-element-simple' x:type='element' x:name='doStuff'>
  <content>true</content>
</loc-unit>

Simple-content elements with non-localisable content

<doStuff>true</doStuff>

Okapi Representation:

<skl-unit id='1' restype='xml-element-simple' x:type='element' x:name='doStuff'>
  <content>true</content>
</skl-unit>

Mixed-content Elements

Elements containing potentially both Text and Element children.

Mixed-content Elements with translatable content

<p>this element may contain translatable <strong>child</strong> elements</p>

Okapi Representation:

<text-unit id='1' restype='xml-element-mixed' x:type='element' x:name='p'>
  <content>
    this element may contain translatable <inline child-ref='c1'>child</inline> elements
  </content>
  <children>
    // in another example
  </children>
</text-unit>

Mixed-content Elements with localisable content

<parent>xxxyyy<doStuff>true</doStuff>xxxyyy</parent>

Okapi Representation:

???

Mixed-content Elements with non-localisable content

<parent>xxxyyy<doStuff>true</doStuff>xxxyyy</parent>

Okapi Representation:

???

Elements with non-mixed complex content

Elements that have only Element children (no Text-children)

Elements that are purely structural

(only element children) go into Groups

<ul>
  <li>...</li>
</ul>

Okapi Representation:

<group id='1' restype='xml-element-structural' x:type='element' x:name='ul'>
  <children>
    // <li> children...
  </children>
</group>

Elements representing segment structures

<c>
  <tr>hello </tr>
  <st type='bold'>
    <tr>BIG</tr>
  </st>
  <tr>world!</tr>
</c>

Okapi Representation:

<text-unit id='1' restype='xml-element-structural' x:type='element' x:name='c'>
  <content mixed='false'>
    <inline>hello </inline>
    <inline>
      <inline>BIG</inline>
    </inline>
    <inline>world!</inline>
  </content>
  <children>
    //tr
    //st -> tr
    //tr
  </children>
</text-unit>

Inline Elements

When the inline element child content is considered part of the parent content: * child content kept with parent, element referenced within a Group (in parent?) When the inline element is isolated (empty element) * element referenced within a Group in parent When the inline element child content is not part of the parent content * element referenced within a Group/TransUnit in parent?

What about:

<str>His name is <name><first>Asgeir</first><last>Frimannsson</last></name>?

Attributes

Translatable attributes

Stored in child TextUnits within the Group/TextUnit refererenced via a property within the Group/TextUnit

Localisable attributes

Stored in localisable properties within the Group/TextUnit. These may be read-only or modifiable.

Non-Localisable attributes

???

Other 'artifacts'

CDATA sections

...

Comments

...

Entities

...

Processing Instructions

...

Updated