Scope and Applicability of IEC 13522-3-00
IEC 13522-3-00 (2004), formally part of the ISO/IEC 13522 family of standards, defines the representation of scripts within the Multimedia and Hypermedia information coding Expert Group (MHEG) framework. This part, commonly referred to as MHEG-3, specifies the syntax and semantics of an interchange format for scripts – procedural program fragments that extend the dynamic behavior of MHEG objects.
The standard applies to systems where multimedia and hypermedia applications need to exchange active content logic independently of the underlying platform or programming language. It enables script code to be transmitted, stored, and instantiated across heterogeneous environments. The scope covers:
- A formal notation for script constructs using Abstract Syntax Notation One (ASN.1), as defined in ISO/IEC 8824.
- Transfer syntax encodings – both binary and textual – for script interchanges, optimized for low-bandwidth and real-time constraints.
- Binding with MHEG-1 objects (scene description and objects) to allow scripts to reference and manipulate hypermedia elements.
- Support for multiple script language profiles, with the default profile based on the MHEG Script language (a subset of JavaScript-like syntax with MHEG-specific extensions).
IEC 13522-3-00 is critical for systems that require dynamic content adaptation, such as interactive digital television, networked kiosks, and tele-learning platforms, where scripts manage navigation, event handling, and data updates.
Technical Requirements: MHEG Script Encoding and Interchange
ASN.1 Module Definition
The core of IEC 13522-3-00 is its ASN.1 module that defines the abstract syntax of MHEG scripts. The module includes types such as ScriptObject, ScriptTerminal, StatementSequence, and Expression. Each script object is encapsulated as an MHEG-1 compatible Object with a ScriptClass tag. The standard mandates that all scripts shall be syntactically correct according to this ASN.1 specification.
Encoding Techniques
Two encoding rules are defined:
- Binary Encoding (BER): Optimized for size, using a tag-length-value structure. It reduces overhead for embedded systems and broadcast environments.
- Textual Encoding (XER): Human-readable XML encoding that facilitates debugging and authoring tools. It is required for interoperability in web-based MHEG implementations.
The encoding rules ensure that a script can be decoded unambiguously regardless of the source platform, with mandatory support of both encodings for a conforming decoder.
Binding to MHEG-1 Objects
Scripts operate on MHEG-1 objects (e.g., BooleanVariable, Bitmap, AudioSegment) through a well-defined API. The script interpreter must provide access to the runtime environment, including object state, event queues, and timing services. The standard specifies a set of intrinsic functions (e.g., GetValue, SetValue, AddListener) that all implementations must support.
Key Technical Specifications
| Parameter | Specification |
| Script Language Profile | MHEG Script (ECMAScript-based with MHEG bindings) |
| Abstract Syntax | ASN.1 module (ISO/IEC 8824-1) |
| Binary Encoding | BER (Basic Encoding Rules, ISO/IEC 8825-1) |
| Text Encoding | XER (XML Encoding Rules, ISO/IEC 8825-4) |
| Max Script Length | 65535 octets (default); extensible via segmentation |
| Runtime API Functions | 57 intrinsic functions including String, Math, and MHEG-specific operations |
| Conformance Class | Class A (full script interpreter) / Class B (limited execution on constrained devices) |
Implementation Highlights and System Integration
Decoder Architecture
A typical implementation of IEC 13522-3-00 involves a Script Decoder that parses the incoming byte stream, builds an abstract syntax tree (AST) using the ASN.1 definitions, and then executes the script within a sandboxed interpreter. The interpreter must manage memory efficiently, as scripts can be loaded incrementally.
Authoring Considerations
Content creators should follow these best practices:
- Use XER encoding for authoring and testing, then switch to BER for deployment to reduce size.
- Bind scripts to MHEG-1 objects using the provided API rather than directly manipulating object internals, to maintain forward compatibility.
- Validate script syntax with a conformance checker that tests against the ASN.1 module and the language profile.
Tip: When designing interactive MHEG applications, encapsulate complex behavior in separate script objects to allow modular updates without replacing the entire scene. Use the ScriptClass object’s event handling to respond to user actions efficiently.
Interoperability with Other MHEG Parts
The standard is designed to work seamlessly with MHEG-1 (ISO/IEC 13522-1) and MHEG-5 (ISO/IEC 13522-5). Scripts can be embedded within Scene objects or referenced as external resources. The runtime integration points include:
- Event injection: Scripts can trigger MHEG events (
UserInput, TimerExpired) which are then processed by the MHEG engine. - Object mutation: Scripts can alter MHEG object properties (e.g., visibility, position, content URL) by calling
SetValue on the object’s state variables. - Streaming synchronization: For continuous media, scripts can call
SyncOn to align with MPEG-2 or MPEG-4 timelines.
Compliance, Testing, and Certification Notes
Conformance Requirements
To claim conformance with IEC 13522-3-00, an implementation must satisfy the following mandatory conditions:
- Decoder conformance: Must correctly decode BER and XER encodings for all script structures defined in the ASN.1 module.
- Interpreter conformance: Must support all intrinsic functions and the language profile (MHEG Script) without divergence in semantics.
- Runtime conformance: Must enforce the allowed operations and security restrictions (e.g., no access to file system unless explicitly allowed).
Caution: Implementations that omit support for the ber encoding are not considered conformant for broadcast use, where bandwidth constraints make binary encoding mandatory. Always verify which encoding profile is required by your target deployment environment.
Testing Methods
The ISO/IEC JTC 1/SC 29 committee provides a set of conformance test suites (e.g., ISO/IEC 13522-3:2000/Amd 1:2003) that include:
- Positive test scripts covering valid object constructions, arithmetic operations, and event flows.
- Negative tests for error handling, edge cases (e.g., zero-length scripts, deeply nested loops).
- Encoding round-trip tests to verify that BER → ASN.1 → XER conversions are lossless.
Best Practice: Use an automated validation pipeline that checks every exported binary script against the official ASN.1 schema using a tool like ASN1C or open-source MHEG validators. This catches structural errors early and ensures compatibility with certified decoders.
Certification Bodies
Industry certification for MHEG products is typically offered by organizations such as the DVB Project (for digital TV profiles) and national testing centers (in Europe and Asia). Products must pass an MHEG-3 conformance test suite to receive a compliance mark. The standard also includes provisions for declaring conformance Class A or B, which should be stated in the product documentation.
Important: Non-compliance with IEC 13522-3-00 can lead to interoperability failures in multi-vendor broadcasting environments. For example, a script that uses a non-standard function call will cause a runtime error in compliant decoders, potentially crashing the entire application. Always validate scripts against the official reference interpreter.
Q: What is the difference between IEC 13522-3-00 (MHEG-3) and MHEG-1 (Part 1)?
A: MHEG-1 defines the static scene representation and object structures. MHEG-3 extends it by adding dynamic behavior through scripts. MHEG-3 objects can be referenced inside MHEG-1 scenes to control interactivity, manipulate variables, and manage asynchronous events. Both parts are needed for a complete interactive multimedia application.
Q: Is IEC 13522-3-00 compatible with modern web technologies (HTML5, JavaScript)?
A: While MHEG Script has syntactic similarities to ECMAScript, it is a custom profile with a limited set of objects tailored to MHEG runtime environment. Direct conversion is not trivial. However, MHEG-3 was designed to support multiple language profiles through its ASN.1 framework, and later amendments have introduced mappings to XML Script and standard JavaScript. For legacy systems, binary MHEG scripts are efficiently decoded without a general-purpose browser engine.
Q: Which industries commonly adopt IEC 13522-3-00?
A: The standard is widely used in digital television (DVB-MHEG profile in the UK and Australia), interactive kiosks, in-flight entertainment systems, and some distance learning platforms. It has been instrumental in providing a standardized scripting layer for broadcast and non-broadcast multimedia systems where deterministic behavior and low latency are required.