Nested Context Language

Designed at TeleMídia Lab - PUC-Rio, NCL - Nested Context Language - is a declarative language for hypermedia-document authoring, which is based on NCM - Nested Context Model

NCL was initially designed aiming at hypermedia document specification for the Web. The language flexibility, its reuse facility, multi-device support, application content and presentation adaptability, and mainly, its intrinsic ability for easily defining spatiotemporal synchronization among media assets, including viewer interactions, make it an outstanding solution for all kinds of DTV systems. For particular cases, as for example when dynamic content generation is needed, NCL provides the Lua (imperative) scripting language [2] support.

As NCL has a stricter separation between content and structure, NCL does not define any media itself. Instead, it defines the glue that holds media together in multimedia presentations. NCL document only defines how media objects are structured and related, in time and space. As a glue language, it does not restrict or prescribe the media-object content types. In this sense, we may have as NCL media objects: image, video, audio, and text perceptual objects; objects with imperative code content (LUA, etc.); and objects with declarative code content (XHTML, etc), including other NCL embedded objects. Which are the media objects supported depends on the media players that are embedded in the NCL player. This decision depends on the digital TV system in which Ginga is the middleware. For example, in the case of ISDB-TB, objects with imperative code content can be Java (XLet) or Lua (NCLua); objects with declarative code content can be XHTML (with the minimum functionalities required in the Standard) or other embedded NCL applications.

Lua is the powerful, fast, lightweight, embeddable scripting language of NCL. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.