<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Schema" >
        <xsd:annotation>
            <xsd:documentation>
                A schema is a collection of cubes and virtual cubes.
                It can also contain shared dimensions (for use by those cubes),
                named sets, roles, and declarations of user-defined functions.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence minOccurs="1" maxOccurs="1">
                <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                <xsd:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            A Parameter defines a schema parameter. It can be referenced from an MDX
                            statement using the ParamRef  function and, if not final, its value can be overridden.
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:attribute name="name" type="xsd:string" use="required">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Name of this parameter. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="description" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Description of this parameter.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="type" use="required">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Indicates the type of this parameter: String, Numeric, Integer,
                                    Boolean, Date, Time, Timestamp, or Member.  
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:simpleType>
                                <xsd:restriction base="xsd:string">
                                    <xsd:enumeration value="String"/>
                                    <xsd:enumeration value="Numeric"/>
                                    <xsd:enumeration value="Integer"/>
                                    <xsd:enumeration value="Boolean"/>
                                    <xsd:enumeration value="Date"/>
                                    <xsd:enumeration value="Time"/>
                                    <xsd:enumeration value="Timestamp"/>
                                    <xsd:enumeration value="Member"/>
                                </xsd:restriction>
                            </xsd:simpleType>
                        </xsd:attribute>
                        <xsd:attribute name="modifiable" type="xsd:boolean" default="true" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    If false, statement cannot change the value of this parameter; the
                                    parameter becomes effectively constant (provided that its default
                                    value expression always returns the same value). Default is true. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="defaultValue" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Expression for the default value of this parameter.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="Dimension" type="SharedDimension" minOccurs="0" maxOccurs="unbounded"/>
                <xsd:element name="Cube" minOccurs="1" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            Definition of a cube.
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                            <xsd:group ref="FactTable" minOccurs="1" maxOccurs="1">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        The fact table is the source of all measures in this cube.
                                        If this is a Table and the schema name is not present, table name is left unqualified. 
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:group>
                            <xsd:choice minOccurs="1" maxOccurs="unbounded">
                                <xsd:element name="DimensionUsage" type="DimensionUsage"/>
                                <xsd:element name="Dimension" type="PrivateDimension"/>
                            </xsd:choice>
                            <xsd:element name="Measure" minOccurs="1" maxOccurs="unbounded">
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                                        <xsd:element name="MeasureExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                                            <xsd:annotation>
                                                <xsd:documentation>
                                                    The SQL expression used to calculate a measure.
                                                    Must be specified if a source column is not specified.
                                                </xsd:documentation>
                                            </xsd:annotation>
                                        </xsd:element>
                                        <xsd:element name="CalculatedMemberProperty" type="CalculatedMemberProperty" minOccurs="0" maxOccurs="unbounded"/>
                                    </xsd:sequence>
                                    <xsd:attribute name="name" type="xsd:string" use="required">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Name of this measure.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="column" type="xsd:string" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Column which is source of this measure's values. If not specified,
                                                a measure expression must be specified.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="datatype" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                The datatype of this measure: String, Numeric, Integer, Boolean, Date, Time or Timestamp.
                                                The default datatype of a measure is 'Integer' if the measure's aggregator is 'Count', otherwise it is 'Numeric'. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:simpleType>
                                            <xsd:restriction base="xsd:string">
                                                <xsd:enumeration value="String"/>
                                                <xsd:enumeration value="Numeric"/>
                                                <xsd:enumeration value="Integer"/>
                                                <xsd:enumeration value="Boolean"/>
                                                <xsd:enumeration value="Date"/>
                                                <xsd:enumeration value="Time"/>
                                                <xsd:enumeration value="Timestamp"/>
                                            </xsd:restriction>
                                        </xsd:simpleType>
                                    </xsd:attribute>
                                    <xsd:attribute name="formatString" type="xsd:string" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Format string with which to format cells of this measure.
                                                For more details, see the mondrian.util.Format class. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="aggregator" use="required">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Aggregation function. Allowed values are "sum", "count", "min", "max", "avg", and "distinct-count".
                                                ("distinct count" is allowed for backwards compatibility, but is deprecated because XML
                                                enumerated attributes in a DTD cannot legally contain spaces.) 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:simpleType>
                                            <xsd:restriction base="xsd:string">
                                                <xsd:enumeration value="sum"/>
                                                <xsd:enumeration value="count"/>
                                                <xsd:enumeration value="min"/>
                                                <xsd:enumeration value="max"/>
                                                <xsd:enumeration value="avg"/>
                                                <xsd:enumeration value="distinct-count"/>
                                            </xsd:restriction>
                                        </xsd:simpleType>
                                    </xsd:attribute>
                                    <xsd:attribute name="formatter" type="xsd:string" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Name of a formatter class for the appropriate cell being displayed.
                                                The class must implement the mondrian.olap.CellFormatter interface.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="caption" type="xsd:string" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                A string being displayed instead of the name.
                                                Can be localized from Properties file using #{propertyname}.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="description" type="xsd:string" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Description of this measure. Can be localized from Properties file using #{propertyname}.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="visible" type="xsd:boolean" use="optional" default="true">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Whether this member is visible in the user-interface. Default true.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="CalculatedMember" type="CalculatedMember" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Calculated members in this cube.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                            <xsd:element name="NamedSet" type="NamedSet" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Named sets in this virtual cube.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="xsd:string" use="required">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Name of this cube. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="caption" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    A string being displayed instead of the cube's name. Can be localized from Properties
                                    file using #{propertyname}.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="description" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Description of this cube. Can be localized from Properties file using #{propertyname}.   
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="defaultMeasure" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The name of the measure that would be taken as the default measure of the cube. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="cache" type="xsd:boolean" default="true" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Should the Fact table data for this Cube be cached by Mondrian or not.
                                    The default action is to cache the data.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="enabled" type="xsd:boolean" default="true" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Whether element is enabled - if true, then the Cube is realized
                                    otherwise it is ignored.   
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="VirtualCube" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            Virtual cubes in this schema.
                            A VirtualCube is a set of dimensions and measures gleaned from other cubes. 
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                            <xsd:element name="CubeUsages" minOccurs="1" maxOccurs="1">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        List of base cubes used by the virtual cube. 
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="CubeUsage" minOccurs="1" maxOccurs="unbounded">
                                            <xsd:complexType>
                                                <xsd:attribute name="cubeName" type="xsd:string" use="required">
                                                    <xsd:annotation>
                                                        <xsd:documentation>
                                                            Name of the cube which the virtualCube uses.
                                                        </xsd:documentation>
                                                    </xsd:annotation>
                                                </xsd:attribute>
                                                <xsd:attribute name="ignoreUnrelatedDimensions" type="xsd:boolean" default="false" use="optional">
                                                    <xsd:annotation>
                                                        <xsd:documentation>
                                                            Unrelated dimensions to measures in this cube will be pushed to top level member.
                                                        </xsd:documentation>
                                                    </xsd:annotation>
                                                </xsd:attribute>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="VirtualCubeDimension" minOccurs="1" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        A VirtualCubeDimension is a usage of a Dimension in a VirtualCube. 
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:attribute name="cubeName" type="xsd:string">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Name of the cube which the dimension belongs to, or unspecified if the dimension is shared.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="name" type="xsd:string">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Name of the dimension.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="VirtualCubeMeasure" minOccurs="1" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        A VirtualCubeMeasure is a usage of a Measure in a VirtualCube.
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                                    </xsd:sequence>
                                    <xsd:attribute name="cubeName" type="xsd:string" use="required">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Name of the cube which the measure belongs to. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="name" type="xsd:string" use="required">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Unique name of the measure within its cube. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                    <xsd:attribute name="visible" type="xsd:boolean" default="true" use="optional">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Whether this member is visible in the user-interface. Default true.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                    </xsd:attribute>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="CalculatedMember" type="CalculatedMember" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Calculated members that belong to this virtual cube.
                                        (Calculated members inherited from other cubes should not be in this list).
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                            <xsd:element name="NamedSet" type="NamedSet" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Named sets in this virtual cube.
                                    </xsd:documentation>
                                </xsd:annotation>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="enabled" type="xsd:boolean" default="true" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Whether this element is enabled - if true, then the Virtual Cube is realized otherwise it is ignored. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="name" type="xsd:string" use="required"/>
                        <xsd:attribute name="defaultMeasure" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The name of the measure that would be taken as the default measure of the cube.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="caption" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    A string being displayed instead of the cube's name. Can be localized from Properties file using #{propertyname}. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="description" type="xsd:string" use="optional">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Description of this virtual cube. Can be localized from Properties file using #{propertyname}. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="NamedSet" type="NamedSet" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            Named sets in this schema.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:element>
                <xsd:element name="Role" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            A role defines an access-control profile. It has a series of grants (or denials) for schema elements. 
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                            <xsd:element name="SchemaGrant" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Grants (or denies) this role access to this schema. access may be "all", "all_dimensions", or "none".
                                        If access is "all_dimensions", the role has access to all dimensions but still needs explicit access to cubes.
                                        See mondrian.olap.Role#grant(mondrian.olap.Schema,int). 
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="CubeGrant" minOccurs="1" maxOccurs="unbounded">
                                            <xsd:annotation>
                                                <xsd:documentation>
                                                    Grants (or denies) this role access to a cube. access may be "all" or "none".
                                                </xsd:documentation>
                                            </xsd:annotation>
                                            <xsd:complexType>
                                                <xsd:sequence>
                                                    <xsd:element name="DimensionGrant" minOccurs="0" maxOccurs="unbounded">
                                                        <xsd:annotation>
                                                            <xsd:documentation>
                                                                Grants (or denies) this role access to a dimension. access may be "all" or "none".
                                                                Note that a role is implicitly given access to a dimension when it is given acess to a cube.
                                                                See also the "all_dimensions" option of the "SchemaGrant" element.
                                                            </xsd:documentation>
                                                        </xsd:annotation>
                                                        <xsd:complexType>
                                                            <xsd:attribute name="dimension" type="xsd:string" use="required">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        The unique name of the dimension
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                            </xsd:attribute>
                                                            <xsd:attribute name="access" use="required">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        Values correspond to Access.
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                                <xsd:simpleType>
                                                                    <xsd:restriction base="xsd:string">
                                                                        <xsd:enumeration value="all"/>
                                                                        <xsd:enumeration value="none"/>
                                                                    </xsd:restriction>
                                                                </xsd:simpleType>
                                                            </xsd:attribute>
                                                        </xsd:complexType>
                                                    </xsd:element>
                                                    <xsd:element name="HierarchyGrant" minOccurs="0" maxOccurs="unbounded">
                                                        <xsd:annotation>
                                                            <xsd:documentation>
                                                                Grants (or denies) this role access to a hierarchy. access may be "all", "custom" or "none".
                                                                If access is "custom", you may also specify the attributes topLevel, bottomLevel, and the member grants.
                                                            </xsd:documentation>
                                                        </xsd:annotation>
                                                        <xsd:complexType>
                                                            <xsd:sequence>
                                                                <xsd:element name="MemberGrant" minOccurs="0" maxOccurs="unbounded">
                                                                    <xsd:annotation>
                                                                        <xsd:documentation>
                                                                            Grants (or denies) this role access to a member. The children of this member inherit that access.
                                                                            You can implicitly see a member if you can see any of its children.
                                                                        </xsd:documentation>
                                                                    </xsd:annotation>
                                                                    <xsd:complexType>
                                                                        <xsd:attribute name="member" type="xsd:string">
                                                                            <xsd:annotation>
                                                                                <xsd:documentation>
                                                                                    The unique name of the member
                                                                                </xsd:documentation>
                                                                            </xsd:annotation>
                                                                        </xsd:attribute>
                                                                        <xsd:attribute name="access" use="required">
                                                                            <xsd:annotation>
                                                                                <xsd:documentation>
                                                                                    Values correspond to Access.
                                                                                </xsd:documentation>
                                                                            </xsd:annotation>
                                                                            <xsd:simpleType>
                                                                                <xsd:restriction base="xsd:string">
                                                                                    <xsd:enumeration value="all"/>
                                                                                    <xsd:enumeration value="none"/>
                                                                                </xsd:restriction>
                                                                            </xsd:simpleType>
                                                                        </xsd:attribute>
                                                                    </xsd:complexType>
                                                                </xsd:element>
                                                            </xsd:sequence>
                                                            <xsd:attribute name="hierarchy" type="xsd:string" use="required">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        The unique name of the hierarchy
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                            </xsd:attribute>
                                                            <xsd:attribute name="access" use="required">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        Values correspond to Access.
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                                <xsd:simpleType>
                                                                    <xsd:restriction base="xsd:string">
                                                                        <xsd:enumeration value="all"/>
                                                                        <xsd:enumeration value="none"/>
                                                                    </xsd:restriction>
                                                                </xsd:simpleType>
                                                            </xsd:attribute>
                                                            <xsd:attribute name="topLevel" type="xsd:string" use="optional">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        Unique name of the highest level of the hierarchy from which this role is allowed to see members.
                                                                        May only be specified if the HierarchyGrant.access is "custom". If not specified, role can see members up to the top level.
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                            </xsd:attribute>
                                                            <xsd:attribute name="bottomLevel" type="xsd:string" use="optional">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        Unique name of the lowest level of the hierarchy from which this role is allowed to see members.
                                                                        May only be specified if the HierarchyGrant.access is "custom". If not specified, role can see members down to the leaf level.
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                            </xsd:attribute>
                                                            <xsd:attribute name="rollupPolicy" default="full" use="optional">
                                                                <xsd:annotation>
                                                                    <xsd:documentation>
                                                                        Policy which determines how cell values are calculated if not all of the children of the current cell are visible to the current role.
                                                                        Allowable values are 'full' (the default), 'partial', and 'hidden'.
                                                                    </xsd:documentation>
                                                                </xsd:annotation>
                                                                <xsd:simpleType>
                                                                    <xsd:restriction base="xsd:string">
                                                                        <xsd:enumeration value="full"/>
                                                                        <xsd:enumeration value="partial"/>
                                                                        <xsd:enumeration value="hidden"/>
                                                                    </xsd:restriction>
                                                                </xsd:simpleType>
                                                            </xsd:attribute>
                                                        </xsd:complexType>
                                                    </xsd:element>
                                                </xsd:sequence>
                                                <xsd:attribute name="cube" type="xsd:string" use="required">
                                                    <xsd:annotation>
                                                        <xsd:documentation>
                                                            The unique name of the cube
                                                        </xsd:documentation>
                                                    </xsd:annotation>
                                                </xsd:attribute>
                                                <xsd:attribute name="access" use="required">
                                                    <xsd:annotation>
                                                        <xsd:documentation>
                                                            Values correspond to Access.
                                                        </xsd:documentation>
                                                    </xsd:annotation>
                                                    <xsd:simpleType>
                                                        <xsd:restriction base="xsd:string">
                                                            <xsd:enumeration value="all"/>
                                                            <xsd:enumeration value="none"/>
                                                        </xsd:restriction>
                                                    </xsd:simpleType>
                                                </xsd:attribute>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                    <xsd:attribute name="access" use="required">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Values correspond to Access.
                                            </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:simpleType>
                                            <xsd:restriction base="xsd:string">
                                                <xsd:enumeration value="all"/>
                                                <xsd:enumeration value="none"/>
                                            </xsd:restriction>
                                        </xsd:simpleType>
                                    </xsd:attribute>
                                </xsd:complexType>
                            </xsd:element>
                            <xsd:element name="Union">
                                <xsd:annotation>
                                    <xsd:documentation>
                                        Body of a Role definition which defines a Role to be the union of several Roles.
                                        The RoleUsage elements must refer to Roles that have been declared earlier in this schema file. 
                                    </xsd:documentation>
                                </xsd:annotation>
                                <xsd:complexType>
                                    <xsd:sequence>
                                        <xsd:element name="RoleUsage" minOccurs="1" maxOccurs="unbounded">
                                            <xsd:annotation>
                                                <xsd:documentation>
                                                    Usage of a Role in a union Role.
                                                </xsd:documentation>
                                            </xsd:annotation>
                                            <xsd:complexType>
                                                <xsd:attribute name="roleName" type="xsd:string"/>
                                            </xsd:complexType>
                                        </xsd:element>
                                    </xsd:sequence>
                                </xsd:complexType>
                            </xsd:element>
                        </xsd:sequence>
                        <xsd:attribute name="name" type="xsd:string" use="required"/>
                    </xsd:complexType>
                </xsd:element>
                <xsd:element name="UserDefinedFunction" minOccurs="0" maxOccurs="unbounded">
                    <xsd:annotation>
                        <xsd:documentation>
                            Declarations of user-defined functions in this schema.
                            A UserDefinedFunction is a function which extends the MDX language.
                            It must be implemented by a Java class which implements the interface mondrian.spi.UserDefinedFunction.
                        </xsd:documentation>
                    </xsd:annotation>
                    <xsd:complexType>
                        <xsd:attribute name="name" type="xsd:string" use="required">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Name with which the user-defined function will be referenced in MDX expressions.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                        <xsd:attribute name="className" type="xsd:string" use="required">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Name of the class which implemenets this user-defined function.
                                    Must implement the mondrian.spi.UserDefinedFunction  interface. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:attribute>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required">
                <xsd:annotation>
                    <xsd:documentation>
                        Name of this schema
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
            <xsd:attribute name="description" type="xsd:string" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        Description of this schema. 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
            <xsd:attribute name="measuresCaption" type="xsd:string" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        Label for the measures dimension.
                        Can be localized from Properties file using #{propertyname}.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
            <xsd:attribute name="defaultRole" type="xsd:string" use="optional">
                <xsd:annotation>
                    <xsd:documentation>
                        The name of the default role for connections to this schema
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="Annotations">
        <xsd:annotation>
            <xsd:documentation>
                Contains values of user-defined properties.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotation" minOccurs="1" maxOccurs="unbounded">
                <xsd:complexType mixed="true">
                    <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="SharedDimension">
        <xsd:annotation>
            <xsd:documentation>
                Shared dimensions in this schema.
                A Dimension is a collection of hierarchies. There are two kinds: a public
                dimension belongs to a Schema, and be used by several cubes;
                a private dimension belongs to a Cube.
                The foreignKey field is only applicable to private dimensions. 
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="Hierarchy" type="Hierarchy" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of this dimension
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="type" use="optional" default="Standard">
            <xsd:annotation>
                <xsd:documentation>
                    The dimension's type may be one of "Standard" or "Time".
                    A time  dimension will allow the use of the MDX time functions
                    (WTD, YTD, QTD, etc.). Use a standard dimension if the dimension
                    is not a time-related dimension. The default value is "Standard". 
                </xsd:documentation>
            </xsd:annotation>
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="Standard"/>
                    <xsd:enumeration value="TimeDimension"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string being displayed instead of the dimensions's name.
                    Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this dimension. Can be localized from Properties file using #{propertyname}.  
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="PrivateDimension">
        <xsd:annotation>
            <xsd:documentation>
                Private dimensions in the cube.
                A Dimension is a collection of hierarchies. There are two kinds: a public
                dimension belongs to a Schema, and be used by several cubes;
                a private dimension belongs to a Cube.
                The foreignKey field is only applicable to private dimensions. 
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="Hierarchy" type="Hierarchy" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of this dimension
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="type" use="optional" default="Standard">
            <xsd:annotation>
                <xsd:documentation>
                    The dimension's type may be one of "Standard" or "Time".
                    A time  dimension will allow the use of the MDX time functions
                    (WTD, YTD, QTD, etc.). Use a standard dimension if the dimension
                    is not a time-related dimension. The default value is "Standard". 
                </xsd:documentation>
            </xsd:annotation>
            <xsd:simpleType>
                <xsd:restriction base="xsd:string">
                    <xsd:enumeration value="Standard"/>
                    <xsd:enumeration value="TimeDimension"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string being displayed instead of the dimensions's name.
                    Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this dimension. Can be localized from Properties file using #{propertyname}.  
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="foreignKey" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    The name of the column in the fact table which joins to the leaf level of this dimension.
                    Required in a private Dimension or a DimensionUsage, but not in a public Dimension.  
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="highCardinality" type="xsd:boolean" default="false" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Flag to mark this dimension as a high cardinality one and avoid caching.   
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="DimensionUsage">
        <xsd:annotation>
            <xsd:documentation>
                A DimensionUsage is usage of a shared Dimension within the context of a cube.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the dimension. Must be a dimension in this schema. Case-sensitive.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="source" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the source dimension. Must be a dimension in this schema. Case-sensitive.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="level" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the level to join to. If not specified, joins to the lowest level of the dimension.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="usagePrefix" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    If present, then this is prepended to the Dimension column names
                    during the building of collapse dimension aggregates allowing 1) different
                    dimension usages to be disambiguated during aggregate table recognition and
                    2) multiple shared dimensions that have common column names to be disambiguated. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="foreignKey" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    The name of the column in the fact table which joins to the leaf level of this dimension.
                    Required in a private Dimension or a DimensionUsage, but not in a public Dimension.  
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="highCardinality" type="xsd:boolean" default="false" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Flag to mark this dimension as a high cardinality one and avoid caching.   
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="Hierarchy">
        <xsd:annotation>
            <xsd:documentation>
                <![CDATA[
                Defines a hierarchy.
                You must specify at most one <Relation> or memberReaderClass.
                If you specify none, the hierarchy is assumed to come from the same
                fact table of the current cube.
                ]]>
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
            <xsd:group ref="Relation" minOccurs="0" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        The Table, Join (set of tables), View (SQL statement), or InlineTable which populates this hierarchy. 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:group>
            <xsd:element name="Level" minOccurs="1" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
                        <xsd:element name="KeyExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The SQL expression used to populate this level's key. 
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="NameExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The SQL expression used to populate this level's name.
                                    If not specified, the level's key is used.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="CaptionExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Expression which forms the caption of members.
                                    If not specified, the level name is used.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="OrdinalExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The SQL expression used to populate this level's ordinal.  
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="ParentExpression" type="ExpressionView" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The SQL expression used to join to the parent member in a parent-child hierarchy.   
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="Closure" minOccurs="0" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Specifies the transitive closure of a parent-child hierarchy. Optional, but recommended
                                    for better performance. The closure is provided as a set of (parent/child) pairs: since it is
                                    the transitive closure these are actually (ancestor/descendant) pairs. 
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="Table" type="Table" minOccurs="1" maxOccurs="1" />
                                </xsd:sequence>
                                <xsd:attribute name="parentColumn" type="xsd:string" use="required"/>
                                <xsd:attribute name="childColumn" type="xsd:string" use="required"/>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="Property" minOccurs="0" maxOccurs="unbounded">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Member property. 
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:attribute name="name" type="xsd:string" use="required" />
                                <xsd:attribute name="column" type="xsd:string" use="required" />
                                <xsd:attribute name="type" default="String" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            Data type of this property: String, Numeric, Integer, Boolean, Date, Time or Timestamp. 
                                        </xsd:documentation>
                                    </xsd:annotation>
                                    <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                            <xsd:enumeration value="String"/>
                                            <xsd:enumeration value="Numeric"/>
                                            <xsd:enumeration value="Integer"/>
                                            <xsd:enumeration value="Boolean"/>
                                            <xsd:enumeration value="Date"/>
                                            <xsd:enumeration value="Time"/>
                                            <xsd:enumeration value="Timestamp"/>
                                        </xsd:restriction>
                                    </xsd:simpleType>
                                </xsd:attribute>
                                <xsd:attribute name="formatter" type="xsd:string" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            Name of a formatter class for the appropriate property value being displayed.
                                            The class must implement the mondrian.olap.PropertyFormatter interface. 
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="caption" type="xsd:string" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            A string being displayed instead of the name. Can be localized from Properties
                                            file using #{propertyname}.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="description" type="xsd:string" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            Description of this member property. Can be localized from Properties file using #{propertyname}.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="dependsOnLevelValue" type="xsd:boolean" default="false" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            Should be set to true if the value of the property is functionally dependent on the level value.
                                            This permits the associated property column to be omitted from the GROUP BY clause
                                            (if the database permits columns in the SELECT that are not in the GROUP BY).
                                            This can be a significant performance enhancement on some databases, such as MySQL. 
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                    <xsd:attribute name="approxRowCount" type="xsd:integer" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The estimated number of members in this level. Setting this property improves
                                the performance of MDSCHEMA_LEVELS, MDSCHEMA_HIERARCHIES
                                and MDSCHEMA_DIMENSIONS XMLA requests.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="name" type="xsd:string" use="required" />
                    <xsd:attribute name="table" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the table that the column comes from. If this hierarchy
                                is based upon just one table, defaults to the name of that table;
                                otherwise, it is required. Can be localized from Properties file using #{propertyname}. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="column" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the column which holds the unique identifier of this level.  
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="nameColumn" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the column which holds the user identifier of this level.   
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="ordinalColumn" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the column which holds member ordinals.
                                If this column is not specified, the key column is used for ordering.    
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="parentColumn" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the column which references the parent member in a parent-child hierarchy.     
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="nullParentValue" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Value which identifies null parents in a parent-child hierarchy. Typical values are 'NULL' and '0'.      
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="type" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Indicates the type of this level's key column: String, Numeric, Integer, Boolean, Date,
                                Time or Timestamp. When generating SQL statements, Mondrian encloses values
                                for String columns in quotation marks, but leaves values for Integer and Numeric columns un-quoted.
                                Date, Time, and Timestamp values are quoted according to the SQL dialect.
                                For a SQL-compliant dialect, the values appear prefixed by their typename, for example, "DATE '2006-06-01'".      
                            </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="String"/>
                                <xsd:enumeration value="Numeric"/>
                                <xsd:enumeration value="Integer"/>
                                <xsd:enumeration value="Boolean"/>
                                <xsd:enumeration value="Date"/>
                                <xsd:enumeration value="Time"/>
                                <xsd:enumeration value="Timestamp"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:attribute>
                    <xsd:attribute name="uniqueMembers" type="xsd:boolean" default="false" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Whether members are unique across all parents. For example, zipcodes are unique across all states.
                                The first level's members are always unique.      
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="levelType" default="Regular" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Whether this is a regular or a time-related level. The value makes a difference to time-related
                                functions such as YTD (year-to-date).       
                            </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="Regular"/>
                                <xsd:enumeration value="TimeYears"/>
                                <xsd:enumeration value="TimeQuarters"/>
                                <xsd:enumeration value="TimeMonths"/>
                                <xsd:enumeration value="TimeWeeks"/>
                                <xsd:enumeration value="TimeDays"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:attribute>
                    <xsd:attribute name="hideMemberIf" use="optional" default="Never">
                        <xsd:annotation>
                            <xsd:documentation>
                                Condition which determines whether a member of this level is hidden. If a hierarchy has one
                                or more levels with hidden members, then it is possible that not all leaf members are the same
                                distance from the root, and it is termed a ragged hierarchy.
                                Allowable values are: Never (a member always appears; the default);
                                IfBlankName (a member doesn't appear if its name is null or empty); and
                                IfParentsName (a member appears unless its name matches the parent's.
                            </xsd:documentation>
                        </xsd:annotation>
                        <xsd:simpleType>
                            <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="Never"/>
                                <xsd:enumeration value="IfBlankName"/>
                                <xsd:enumeration value="IfParentsName"/>
                            </xsd:restriction>
                        </xsd:simpleType>
                    </xsd:attribute>
                    <xsd:attribute name="formatter" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Name of a formatter class for the member labels being displayed.
                                The class must implement the mondrian.olap.MemberFormatter interface. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="caption" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                A string being displayed instead of the level's name. Can be localized from
                                Properties file using #{propertyname}. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="description" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Description of this level. Can be localized from Properties file using #{propertyname}. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="captionColumn" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The name of the column which holds the caption for members.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="MemberReaderParameter" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>
                        Not used
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                    <xsd:attribute name="name" type="xsd:string" use="required"/>
                    <xsd:attribute name="value" type="xsd:string" use="required"/>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the hierarchy. If this is not specified, the hierarchy
                    has the same name as its dimension.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="hasAll" type="xsd:boolean" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Whether this hierarchy has an 'all' member. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="allMemberName" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the 'all' member. If this attribute is not specified,
                    the all member is named 'All hierarchyName', for example, 'All Store'.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="allMemberCaption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string being displayed instead as the all member's name.
                    Can be localized from Properties file using #{propertyname}.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="allLevelName" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the 'all' level. If this attribute is not specified, the all member is named '(All)'.
                    Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="primaryKey" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    The name of the column which identifies members, and which is referenced by rows
                    in the fact table. If not specified, the key of the lowest level is used.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="primaryKeyTable" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    The name of the table which contains primaryKey. If the hierarchy has only one table,
                    defaults to that; otherwise it is required. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="defaultMember" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Default member of this hierarchy. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="memberReaderClass" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the custom member reader class. Must implement the
                    mondrian.rolap.MemberReader interface. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string to be displayed in the user interface. If not specified, the hierarchy's name is used.
                    Can be localized from Properties file using #{propertyname}.  
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this hierarchy. Can be localized from Properties file using #{propertyname}.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="uniqueKeyLevelName" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Should be set to the level (if such a level exists) at which depth it is known that all members
                    have entirely unique rows, allowing SQL GROUP BY clauses to be completely eliminated from the query. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:group name="Relation">
        <xsd:choice>
            <xsd:element name="Table" type="Table"/>
            <xsd:element name="View" type="View"/>
            <xsd:element name="Join">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:group ref="Relation" minOccurs="2" maxOccurs="2"/>
                    </xsd:sequence>
                    <xsd:attribute name="leftAlias" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Defaults to left's alias if left is a table, otherwise required. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="leftKey" type="xsd:string"/>
                    <xsd:attribute name="rightAlias" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                Defaults to right's alias if right is a table, otherwise required.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="rightKey" type="xsd:string"/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="InlineTable">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ColumnDefs" minOccurs="1" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Holder for an array of ColumnDef elements
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="ColumnDef" minOccurs="1" maxOccurs="unbounded">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Column definition for an inline table. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:complexType>
                                            <xsd:attribute name="name" type="xsd:string">
                                                <xsd:annotation>
                                                    <xsd:documentation>
                                                        Name of the column. 
                                                    </xsd:documentation>
                                                </xsd:annotation>
                                            </xsd:attribute>
                                            <xsd:attribute name="type">
                                                <xsd:annotation>
                                                    <xsd:documentation>
                                                        Type of the column: String, Numeric, Integer, Boolean, Date, Time or Timestamp. 
                                                    </xsd:documentation>
                                                </xsd:annotation>
                                                <xsd:simpleType>
                                                    <xsd:restriction base="xsd:string">
                                                        <xsd:enumeration value="String" />
                                                        <xsd:enumeration value="Numeric" />
                                                        <xsd:enumeration value="Integer" />
                                                        <xsd:enumeration value="Boolean" />
                                                        <xsd:enumeration value="Date" />
                                                        <xsd:enumeration value="Time" />
                                                        <xsd:enumeration value="Timestamp" />
                                                    </xsd:restriction>
                                                </xsd:simpleType>
                                            </xsd:attribute>
                                        </xsd:complexType>
                                        
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="Rows" minOccurs="1" maxOccurs="1">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Holder for an array of Row elements
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:sequence>
                                    <xsd:element name="Row" minOccurs="1" maxOccurs="unbounded">
                                        <xsd:annotation>
                                            <xsd:documentation>
                                                Row definition for an inline table. Must have one Column for each ColumnDef in the InlineTable. 
                                            </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:complexType>
                                            <xsd:sequence>
                                                <xsd:element name="Value" minOccurs="1" maxOccurs="unbounded">
                                                    <xsd:annotation>
                                                        <xsd:documentation>
                                                            Column value for an inline table. The CDATA holds the value of the column.
                                                        </xsd:documentation>
                                                    </xsd:annotation>
                                                    <xsd:complexType mixed="true">
                                                        <xsd:attribute name="column" type="xsd:string">
                                                            <xsd:annotation>
                                                                <xsd:documentation>
                                                                    Name of the column. 
                                                                </xsd:documentation>
                                                            </xsd:annotation>
                                                        </xsd:attribute>
                                                    </xsd:complexType>
                                                </xsd:element>
                                            </xsd:sequence>
                                        </xsd:complexType>
                                    </xsd:element>
                                </xsd:sequence>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:choice>
    </xsd:group>
    <xsd:group name="FactTable">
        <xsd:choice>
            <xsd:element name="Table" type="Table"/>
            <xsd:element name="View" type="View"/>
            
            
        </xsd:choice>
    </xsd:group>
    <xsd:group name="AggTable">
        <xsd:annotation>
            <xsd:documentation>
                A definition of an aggregate table for a base fact table.
                This aggregate table must be in the same schema as the base fact table. 
            </xsd:documentation>
        </xsd:annotation>
        <xsd:choice>
            <xsd:element name="AggName">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="AggFactCount" type="AggColumnName" minOccurs="1" maxOccurs="1"/>
                        <xsd:element name="AggIgnoreColumn" type="AggColumnName" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element name="AggForeignKey" minOccurs="0" maxOccurs="unbounded">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The name of the column mapping from base fact table foreign key to aggregate table foreign key. 
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:attribute name="factColumn" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the base fact table foreign key.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="aggColumn" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the aggregate table foreign key.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="AggMeasure" minOccurs="1" maxOccurs="unbounded">
                            <xsd:complexType>
                                <xsd:attribute name="column" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the column mapping to the measure name.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="name" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the Cube measure.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="AggLevel" minOccurs="0" maxOccurs="unbounded">
                            <xsd:complexType>
                                <xsd:attribute name="column" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the column mapping to the measure name.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="name" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the Cube measure.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                    <xsd:attribute name="name" type="xsd:string" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                The Table name of a Specific aggregate table.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="ignorecase" type="xsd:boolean" default="true" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Whether or not the match should ignore case.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="AggPattern">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="AggFactCount" type="AggColumnName" minOccurs="1" maxOccurs="1"/>
                        <xsd:element name="AggIgnoreColumn" type="AggColumnName" minOccurs="0" maxOccurs="unbounded"/>
                        <xsd:element name="AggForeignKey" minOccurs="0" maxOccurs="unbounded">
                            <xsd:annotation>
                                <xsd:documentation>
                                    The name of the column mapping from base fact table foreign key to aggregate table foreign key. 
                                </xsd:documentation>
                            </xsd:annotation>
                            <xsd:complexType>
                                <xsd:attribute name="factColumn" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the base fact table foreign key.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="aggColumn" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the aggregate table foreign key.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="AggMeasure" minOccurs="1" maxOccurs="unbounded">
                            <xsd:complexType>
                                <xsd:attribute name="column" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the column mapping to the measure name.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="name" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the Cube measure.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="AggLevel" minOccurs="0" maxOccurs="unbounded">
                            <xsd:complexType>
                                <xsd:attribute name="column" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the column mapping to the measure name.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="name" type="xsd:string" use="required">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The name of the Cube measure.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="AggExclude" minOccurs="0" maxOccurs="unbounded">
                            <xsd:complexType>
                                <xsd:attribute name="pattern" type="xsd:string" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            A Table pattern not to be matched.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="name" type="xsd:string" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            The Table name not to be matched. 
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                                <xsd:attribute name="ignorecase" type="xsd:boolean" default="true" use="optional">
                                    <xsd:annotation>
                                        <xsd:documentation>
                                            Whether or not the match should ignore case.
                                        </xsd:documentation>
                                    </xsd:annotation>
                                </xsd:attribute>
                            </xsd:complexType>
                        </xsd:element>
                    </xsd:sequence>
                    <xsd:attribute name="pattern" type="xsd:string" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                A Table pattern used to define a set of aggregate tables.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="ignorecase" type="xsd:boolean" default="true" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                Whether or not the match should ignore case.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
        </xsd:choice>
    </xsd:group>
    <xsd:complexType name="AggColumnName">
        <xsd:attribute name="column" type="xsd:string" use="required"/>
    </xsd:complexType>
    <xsd:complexType name="SQL" mixed="true">
        <xsd:attribute name="dialect" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Dialect of SQL the view is intended for. Valid values include, but are not limited to:
                    * generic
                    * access
                    * db2
                    * derby
                    * firebird
                    * hsqldb
                    * mssql
                    * mysql
                    * nuodb
                    * oracle
                    * postgres
                    * sybase
                    * teradata
                    * ingres
                    * infobright
                    * luciddb
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="ExpressionView">
        <xsd:sequence>
            <xsd:element name="SQL" type="SQL" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Table">
        <xsd:sequence>
            <xsd:element name="SQL" type="SQL" minOccurs="0" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        The SQL WHERE clause expression to be appended to any select statement 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="AggExclude" minOccurs="0" maxOccurs="unbounded">
                <xsd:complexType>
                    <xsd:attribute name="pattern" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                A Table pattern not to be matched. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="name" type="xsd:string" use="optional">
                        <xsd:annotation>
                            <xsd:documentation>
                                The Table name not to be matched. 
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                    <xsd:attribute name="ignorecase" type="xsd:boolean" use="optional" default="true">
                        <xsd:annotation>
                            <xsd:documentation>
                                Whether or not the match should ignore case.  
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
            <xsd:group ref="AggTable" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>
                        A definition of an aggregate table for a base fact table.
                        This aggregate table must be in the same schema as the base fact table. 
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:group>
            <xsd:element name="Hint" minOccurs="0" maxOccurs="unbounded">
                <xsd:annotation>
                    <xsd:documentation>
                        Dialect-specific table optimization hints.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType mixed="true">
                    <xsd:attribute name="type" type="xsd:string" use="required">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type of hint, interpreted and applied on a per-dialect basis.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:attribute>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required"/>
        <xsd:attribute name="schema" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Optional qualifier for table. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="alias" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Alias to be used with this table when it is used to form queries.
                    If not specified, defaults to the table name, but in any case, must be unique within the schema.
                    (You can use the same table in different hierarchies, but it must have different aliases.) 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="View">
        <xsd:annotation>
            <xsd:documentation>
                A collection of SQL statements, one per dialect. 
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="SQL" type="SQL" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="alias" type="xsd:string" use="required" />
    </xsd:complexType>
    <xsd:complexType name="CalculatedMember">
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="Formula" minOccurs="0" maxOccurs="1">
                <xsd:annotation>
                    <xsd:documentation>
                        MDX expression which gives the value of this member.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="CalculatedMemberProperty" type="CalculatedMemberProperty" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of this calculated member.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="formatString" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Format string with which to format cells of this member.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string being displayed instead of the name. Can be localized from Properties file using #{propertyname}.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this calculated member. Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="formula" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    MDX expression which gives the value of this member. Equivalent to the Formula sub-element.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="dimension" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of the dimension which this member belongs to.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="visible" type="xsd:boolean" use="optional" default="true">
            <xsd:annotation>
                <xsd:documentation>
                    Whether this member is visible in the user-interface. Default true.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="CalculatedMemberProperty">
        <xsd:annotation>
            <xsd:documentation>
                Property of a calculated member defined against a cube. It must have either an expression or a value.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of this member property.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    A string being displayed instead of the Properties's name.
                    Can be localized from Properties file using #{propertyname}.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this calculated member property. Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="expression" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    MDX expression which defines the value of this property.
                    If the expression is a constant string, you could enclose it in quotes,
                    or just specify the 'value' attribute instead.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="value" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Value of this property. If the value is not constant,
                    specify the 'expression' attribute instead.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
    <xsd:complexType name="NamedSet">
        <xsd:annotation>
            <xsd:documentation>
                Defines a named set which can be used in queries in the same way as a set
                defined using a WITH SET clause. A named set can be defined against a particular cube,
                or can be global to a schema. If it is defined against a cube, it is only available to queries which use that cube.
                A named set defined against a cube is not inherited by a virtual cubes defined against that cube.
                (But you can define a named set against a virtual cube). A named set defined against a schema
                is available in all cubes and virtual cubes in that schema.
                However, it is only valid if the cube contains dimensions with the names required to make the formula valid.
            </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="Annotations" type="Annotations" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="Formula" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>
                        MDX expression which gives the value of this set.
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required">
            <xsd:annotation>
                <xsd:documentation>
                    Name of this named set.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="caption" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Caption of this named set. Can be localized from Properties file using #{propertyname}.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="description" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    Description of this named set. Can be localized from Properties file using #{propertyname}. 
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="formula" type="xsd:string" use="optional">
            <xsd:annotation>
                <xsd:documentation>
                    MDX expression which gives the value of this set. Equivalent to the Formula sub-element.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>
</xsd:schema>
