- From: Norm Tovey-Walsh <norm@saxonica.com>
- Date: Wed, 15 Oct 2025 11:40:54 +0100
- To: ixml <public-ixml@w3.org>
Hello,
At the 14 October 2025 CG meeting, I reported that NineML version 3.3.2 contains an experimental implementation of Modular iXML (inspired by the work that Steven reported at MarkupUK).
I also said that I made some slightly different design choices and agreed to report them here to encourage discussion. Here’s the sample
from Steven’s paper:
module: s, (uses; shares)*, ixml.
uses: -"+uses", RS, from++(-";", s).
shares: -"+shares", RS, entries.
from: entries, RS, -"from", rs, location, s.
-entries: share++(-",", s).
share: @name, s.
@source: iri.
There are some obvious typos: “rs” where “RS” was intended and (I think) “location” where “source” was intended.
Steven uses iri from iri.ixml in the paper. That’s a nice example, but I think we should keep the iXML grammar for iXML simple. I changed iri to string: quoting URIs (often filenames, sometimes with spaces) is just easier for users, I think. And I don’t really want to embed a whole grammar for IRIs here.
That fragment also uses “from” which we already use in the iXML grammar, but that’s easy to fix with a renaming.
Finally, Steven has failed to address the prolog.
With those fixes, we get:
module: s, (prolog, RS)?, (uses; shares)*, ixml.
uses: -"+uses", RS, mfrom++(-";", s).
shares: -"+shares", RS, entries.
mfrom>from: entries, RS, -"from", RS, source, s.
-entries: share++(-",", s).
share: @name, s.
@source: string .
ixml: rule++RS, s.
Next, looking at an example:
+uses decimal from "numbers.ixml"
+shares partnumber
partnumber = -decimal .
I felt like the uses and shares declarations would be more consistent if they ended with a full stop. The full stops are not required to parse, obviously, but I think it’s better for usability. (Don’t make me remember which iXML constructs end with a “.” and which don’t, please.)
Finally, I wanted to avoid having a different grammar for inputs that use modules and inputs that don’t. Creating a new top-level “module” nonterminal is fine, but for non-modular grammars, it changes the XML serialization unnecessarily. (Behind the scenes this is how 3.2.2 works, but I’m planning to reimplement it with a single iXML grammar that includes modules.) I think this works:
ixml: s, (prolog, RS)?, ((uses; shares), RS)*, rule++RS, s.
uses: -"+uses", RS, mfrom++(-";", s), s, -'.' .
shares: -"+shares", RS, entries, s, -'.' .
mfrom>from: entries, RS, -"from", RS, source .
-entries: share++(-",", s).
share: @name.
@source: string .
This loses the “ixml” wrapper in the module, but it preserves the serialization of existing iXML grammars that don’t use any modularity features.
Be seeing you,
norm
--
Norm Tovey-Walsh
Saxonica
Received on Wednesday, 15 October 2025 10:41:01 UTC