[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Example of nested Groups and Units
All I attach an example json which tests nested Units and Groups. I took it from Bryan Schnabel’s excellent XLIFF book. I could push it to the repo but not sure I have access (philinthecloud). My code has quite a nice fluent syntax: Jliff maximalist =
new Jliff("en",
"de",
new File("d1e1",
new Group("d1e1",
new Group("d1e2",
new Unit("d1e3",
new Segment(
new TextElement("Birds in Oregon"),
new TextElement(""))),
new Unit("d1e5",
new Segment(
new TextElement(
"Oregon is a mostly temperate state. There are many different kinds of birds that thrive."),
new TextElement("")) ),
new Group("d1e7",
new Unit("d1e8",
new Segment(
new TextElement("High Altitude Birds"),
new TextElement("") ) ),
new Unit("d1e10",
new Segment(
new TextElement(
"Birds that thrive in the high altitude include the White-tailed Ptarmigan, Sharp-tailed Grouse, Yellow-billed Loon, Cattle Egret, Gyrfalcon, Snowy Owl, Yellow-billed Cuckoo, and Boreal
Owl."),
new TextElement("") ) ) ), When I have time I’ll try to create some more complex examples. Phil
|
Attachment:
XliffBook.json
Description: XliffBook.json
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]