- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Tue, 28 Apr 2026 12:44:57 +0000
- To: ixml <public-ixml@w3.org>
An action I had was to bring together the requirements from the two modularisation proposals. Here they are. Steven: https://cwi.nl/~steven/Talks/2025/06-06-markupuk/paper.html * Prevent name clashes * It should be designed as a preprocessor that takes modules and an invoking grammar, and produces a single ixml grammar as output; in this way it will work with all existing ixml processors without change. * There should be no change required to ixml proper: just use the existing syntax and semantics. * Modules should be able to invoke other modules. * Modules should have a visible contract of use, on both the producer's as the user's side, so that it is obvious what each module uses and shares, and that if there are different implementations of a particular module they can be swapped in and out. * The internals of a module should be protected, so that a module owner can change the implementation of a module, as long as the interface contract is maintained. * It should be possible to independently check modules for completeness and consistency, so that modules can be checked before they are combined. * Although modules may be transformed to prevent name clashes, no changes should be made to the invoking grammar, so that error messages are in the user's terms, and not using renamed terms. * Despite rules being renamed, the resultant serialisation should not change. * Modularisation should be kept as simple and easy-to-use as possible while meeting the requirements. Norm: https://nineml.org/proposals/2026/modularity/ * A grammar author must be able to include rules from one or more other grammars. * A grammar author must be able to define a public interface which specifies the nonterminals they expect to share. * It should be convenient to include all of the rules that are in the public interface and no others. * It should be possible to include any rule from a grammar. Ultimately, reuse should be in the hands of the author of the including grammar. * When combining grammars, simply including a nonterminal from another grammar does not change its definition. * It must, however, also be possible to redefine any nonterminal in the included grammar. * It may happen that two different grammars define a nonterminal with the same name and that an author wishes to include both of them. It must be possible to disambiguate their names. (It must be possible to include the “digit” nonterminal from bodyparts.ixml and the “digit” nonterminal from numbers.ixml into the same including grammar.) #
Received on Tuesday, 28 April 2026 12:45:03 UTC