OASIS XLIFF Object Model and Other Serializations (XLIFF OMOS) TC

Glossary module serialization and 'type' values

  • 1.  Glossary module serialization and 'type' values

    Posted 04-24-2017 21:23
    Hi Robert & all, I've opened a pull request here: https://github.com/oasis-tcs/xliff-omos-jliff/pull/4 Full changeset here: https://github.com/oasis-tcs/xliff-omos-jliff/pull/4/files This contains my first attempt to serialize the glossary module in JLIFF.  I had initially hoped that I might be able to do something like implement the glossary object as a map of id references -> corresponding term data.  However, this doesn't work because "ref" is optional glossary entries!  That is, it's legal for a <unit> to bundle free-floating glossary data that doesn't correspond directly to anything in the unit.  Similarly, there can be multiple translations for a given term, only one of which is actually used in the unit.  As a result, this mapping follows the XML model fairly closely. This pull request also divides up the 'type' definition in the schema into 3 definitions: type - for 'type' values in unit/group codeType - for 'type' values in sc/ec/ph mrkType - for 'type' values in sm In all cases, the property in question is still called "type", it just references the appropriate definition depending on context in order to correctly model the allowed value space.  (For example, "type" in sc/ec/ph must be one of a fixed set of pre-defined values, while other contexts allow for user-defined values that match a pattern.