oasis-tcs / xliff-omos-jliff

OASIS XLIFF OMOS TC: JSON serialization of the XLIFF Abstract Object Model
https://github.com/oasis-tcs/xliff-omos-jliff
Other
17 stars 4 forks source link

schema misses the order property #30

Closed DavidFatDavidF closed 3 years ago

DavidFatDavidF commented 3 years ago

The schema for target doesn't encode a property equivalent to XLIFF @order This has impact on how target is encoded. It seems it cannot be "target" : [ array ] because this way it cannot express the order property..

I assigned this to the December meeting milestone to make sure that this will be reviewed..

DavidFatDavidF commented 3 years ago

We discussed options in the meeting on Dec 15

The three possible options are listed below. We agreed that @genivia-inc will implement option 3) by January meeting and we will review then..

1) add a wrapper for both source and target.

Pros

That would also allow for having order and xml:lang on target and xml:lang on source. Solves order and xml:lang uniformly and the structure is very closely following XLIFF.

Cons

However, we felt that a wrapper is too big a hammer that would kill the elegance of the source and target arrays, where source and target are the heavy lifting elements in XLIFF and JLIFF that are processed the most.

2) another option would be to introduce an optional order object to lead the target array and be unique.

Cons

Feels hacky

3) introduce three new optional properties on segment

source-xml-lang
target-xml-lang
target-order
Cons

structure is different to XLIFF

Pros

keeps the source and target arrays elegantly accessible without syntactic sugar

DavidFatDavidF commented 3 years ago

In meeting on 23rd February, we realized that

source-xml-lang
target-xml-lang
target-order

should be introduced on segment as well as ignorable

DavidFatDavidF commented 3 years ago

agree using camelCase instead of hyphenation

sourceXmlLang
targetXmlLang
targetOrder

xmlLang should be removed from segment

DavidFatDavidF commented 3 years ago

dF to implement in prose