ModuleDecl

Identify library module.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

ModuleDecl

graphics/ModuleDecl.png

NCName StringLiteral

Description

A ModuleDecl identifies a module as a library module, since only library modules contain a module declaration. It contains the keyword module which is followed by a namespace declaration with the NCName specifying the namespace prefix and the string literal specifying the namespace URI that defines the target namespace of the library module. This namespace is used for all functions and variables exported by this module.

Example

  • This module declaration binds the URI http://example.org/math-functions to all functions and variable declarations that follow this declaration:

    module namespace math = "http://example.org/math-functions"