Class: Tbx::Document

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/tbx/document.rb

Overview

Root element of a TBX (Termbase Exchange) document per ISO 30042:2019.

The ‘type` attribute declares the dialect (e.g. “TBX-Basic”, “TBX-Min”, “TBX-Core”, “TBX-Linguist”), and `style` declares the serialization style (“dca” for Data Category Archive or “dct” for Data Category Tagging).

Schema source: TBXcoreStructV03.rng ‘<define name=“tbx”>`

Examples:

Parsing a TBX file

doc = Tbx::Document.from_xml(File.read("glossary.tbx"))
doc.type   # => "TBX-Basic"
doc.style  # => "dca"