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:
<Schema> <Cube> <Table> <AggName> aggElements aggElements relation <Closure/> <Level> <SQL/> <SQL/> <SQL/> <SQL/> <SQL/> <Property> <SQL/> <Measure> <SQL/> <Formula/> <NamedSet> <Formula/> <Role> <MemberGrant/> <Union> <RoleUsage/> <Parameter/>
relation ::=
<Table> <SQL/> <View> <SQL/> <Rows> <Row> <Value> <Join> relation
aggElement ::=
<AggLevel>
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.
2 comments:
Hi Julian,
I haven't looked into the schema changes, but the railroad diagrams look nice. I'm impressed how fast you managed to create a working solution like this. Good work!
In the result, I noticed a few minor things that could be improved:
1) vertical text alignment. For non-terminals text is close to the bottom, for terminals it's close tot the top. I think it would better to have the text perfectly centered vertically in both cases.
2) for terminals, the text is a bit close to the left boundary of the box. It would be nice to have a bit more space there.
See for example http://clapham.hydromatic.net/mondrian-4.0-bnf/AggName.svg
this illustrates both issues.
Roland,
Yeah, fair comment, the text alignment needs to be fixed. I'll get to them in the next revision (whenever that is).
Julian
Post a Comment