There are some major schema changes coming in Mondrian 4.0, and I’m writing up specifications for these so that everyone knows what’s coming and has chance to influence it.

But before I do that, I thought I’d try to improve how we describe the structure of XML schemas in the present release, just a bit. I have tried a couple of things. First, I created an XML skeleton that shows which elements can occur inside which other elements:

aggElements
aggElements
relation
<SQL/>
<SQL/>
<SQL/>
<SQL/>
<SQL/>
<SQL/>
<SQL/>

relation ::=
<SQL/>
<SQL/>
<Row>
relation

aggElement ::=

You can see the full version in the Mondrian schema guide.

This approach shows where things are located, but it doesn’t show how many of each element can belong to a particular parent element, or the order in which they are required. So, I wrote up a small BNF grammar and used Clapham to generate a railroad diagram. For comparison, the railroad diagram for the work-in-progress mondrian-4.0 schema is here.