OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff-omos message

[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


Phil Ritchie
Chief Technology Officer | Vistatec
Vistatec House, 700 South Circular Road,
Kilmainham, Dublin 8, Ireland.
Tel: +353 1 416 8000 | Direct: +353 1 416 8024
Email: phil.ritchie@vistatec.com
www.vistatec.com | ISO 9001 | ISO 13485 | ISO 17100 | ISO 27001
Vistatec
Think Global
FacebookLinkedInTwitterGoogle Plus
Vistatec Ltd. Registered in Ireland 268483. Registered Office, Vistatec House, 700, South Circular Road, Kilmainham. Dublin 8. Ireland.
The information contained in this message, including any accompanying documents, is confidential and is intended only for the addressee(s).
​The unauthorized use, disclosure, copying, or alteration of this message is strictly forbidden.
If you have received this message in error please notify the sender immediately.

 

Attachment: XliffBook.json
Description: XliffBook.json



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]