[Mondrian] Mondrian 4 XSD

Julian Hyde jhyde at pentaho.com
Wed Jan 16 17:13:09 EST 2013


See comments inline.

On Tue, Jan 15, 2013 at 1:05 PM, Diethard Steiner <diethard.steiner at gmail.com<mailto:diethard.steiner at gmail.com>> wrote:
So I have been creating an XML file based on the Mondrian 4 DTD you mentioned.
There seems to be a problem with the Measure element within Measures ... which turns out to be invalid based on this DTD. I am following the example from the Mondrian 4 book. Screenshots attached. Based on the DTD, there seems to be only MeasureOrRef valid within Measures.

Mondrian's schema definition uses something like super-types to define collections of allowable elements. "MeasureOrRef" is such a supertype. There is no actual XML element called "MeasureOrRef". The allowed children of Measures are Measure and MeasureRef.

- It is not possible to define a degenerate dimension: The DTD is unaware of any column attribute for the attribute element (sample in Mondrian 4 book shows an attribute column)

That was a typo in the book. It should read "keyColumn" and not "column", thus:

<Dimension name='Payment Type' table='sales_fact_1997'>
  <Attributes>


    <Attribute name='Payment Type' keyColumn='payment_type'
               approxRowCount='3'/>


  </Attributes>
</Dimension>

- It is not possible to create a FactLink as a child of DimensionLinks

This is a similar misunderstanding to MeasureOrRef. DimensionLinks allows children whose supertype is "DimensionLink". The elements that have that property are ForeignKeyLink, FactLink, ReferenceLink, NoLink, CopyLink.

Only ForeignKeyLink, FactLink, NoLink are described in ch 4 and 5 currently.

Thanks for the feedback... keep it coming!

For feedback related to the book, you can also post to Manning's forums (http://www.manning-sandbox.com/forum.jspa?forumID=823). Or this list. Whichever you prefer.

Julian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20130116/662b4b37/attachment.html 


More information about the Mondrian mailing list