configurationengine/source/cone/validation/implml_xsd/implml-template.xsd
changeset 3 e7e0ae78773e
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
       
     3            targetNamespace="http://www.symbianfoundation.org/xml/implml/1"
       
     4            xmlns:implml="http://www.symbianfoundation.org/xml/implml/1"
       
     5            {% for entry in data -%}
       
     6            xmlns:{{entry.id}}="{{entry.namespace}}"
       
     7            {% endfor -%}
       
     8            elementFormDefault="qualified">
       
     9     
       
    10     {% for entry in data -%}
       
    11     <xs:import namespace="{{entry.namespace}}"
       
    12                schemaLocation="{{entry.filename}}" />
       
    13     {% endfor %}
       
    14     
       
    15     <xs:element type="implml:containerType" name="container">
       
    16         <xs:annotation>
       
    17             <xs:documentation>
       
    18                 Defines the root implementation container for a multi-implementation ImplML file.
       
    19             </xs:documentation>
       
    20         </xs:annotation>
       
    21     </xs:element>
       
    22     
       
    23     
       
    24     <!-- ======================== -->
       
    25     <!-- Implementation container -->
       
    26     <!-- ======================== -->
       
    27     <xs:complexType name="containerType">
       
    28         <xs:choice minOccurs="0" maxOccurs="unbounded">
       
    29             <xs:element ref="implml:phase"/>
       
    30             <xs:element ref="implml:tag"/>
       
    31             <xs:element ref="implml:settingRefsOverride"/>
       
    32             <xs:element ref="implml:tempVariable"/>
       
    33             <xs:element ref="implml:tempVariableSequence"/>
       
    34             <xs:element ref="implml:outputRootDir"/>
       
    35             <xs:element ref="implml:outputSubDir"/>
       
    36             
       
    37             <xs:element name="container" type="implml:containerType">
       
    38             <xs:annotation>
       
    39                 <xs:documentation>
       
    40                     <![CDATA[
       
    41                     Defines an implementation container that can contain implementations and other containers.<br/>
       
    42                     <br/>
       
    43                     A container element can also contain other common elements affect all implementations defined
       
    44                     inside the container.
       
    45                     ]]>
       
    46                 </xs:documentation>
       
    47             </xs:annotation>
       
    48             </xs:element>
       
    49             
       
    50             {% for entry in data -%}
       
    51             <xs:element ref="{{entry.id}}:{{entry.root_elem_name}}"/>
       
    52             {% endfor -%}
       
    53         </xs:choice>
       
    54         <xs:attribute name="condition" type="xs:string" use="optional">
       
    55             <xs:annotation>
       
    56                 <xs:documentation>
       
    57                     <![CDATA[
       
    58                     Specifies a condition that determines whether the implementation container is
       
    59                     entered during execution.<br/>
       
    60                     <br/>
       
    61                     The condition should be a simple ConfML setting reference enclosed with ${},
       
    62                     e.g. '${MyFeature.MySetting}'. If the value of the setting is equal to the
       
    63                     expected value (defined using the 'value' attribute), the implementation
       
    64                     container will be entered and the implementations inside executed. Note that
       
    65                     the condition is evaluated at the moment the decision to enter the container
       
    66                     or not is made.
       
    67                     ]]>
       
    68                 </xs:documentation>
       
    69             </xs:annotation>
       
    70         </xs:attribute>
       
    71         <xs:attribute name="value" type="xs:string" use="optional">
       
    72             <xs:annotation>
       
    73                 <xs:documentation>
       
    74                     Defines the expected value for the 'condition' attribute, defaults to 'true'.
       
    75                 </xs:documentation>
       
    76             </xs:annotation>
       
    77         </xs:attribute>
       
    78     </xs:complexType>
       
    79     
       
    80     
       
    81     <!-- ===== -->
       
    82     <!-- Phase -->
       
    83     <!-- ===== -->
       
    84     <xs:element name="phase">
       
    85         <xs:annotation>
       
    86             <xs:documentation>
       
    87                 Overrides the execution phase of the implementations inside the container.
       
    88             </xs:documentation>
       
    89         </xs:annotation>
       
    90         <xs:complexType>
       
    91             <xs:attribute name="name" type="xs:string" use="required"/>
       
    92         </xs:complexType>
       
    93     </xs:element>
       
    94     
       
    95     
       
    96     <!-- === -->
       
    97     <!-- Tag -->
       
    98     <!-- === -->
       
    99     <xs:element name="tag">
       
   100         <xs:annotation>
       
   101             <xs:documentation>
       
   102                 Defines an implementation tag for the implementations inside the container.
       
   103             </xs:documentation>
       
   104         </xs:annotation>
       
   105         <xs:complexType>
       
   106             <xs:attribute name="name" type="xs:string" use="required"/>
       
   107             <xs:attribute name="value" type="xs:string" use="required"/>
       
   108         </xs:complexType>
       
   109     </xs:element>
       
   110     
       
   111     
       
   112     <!-- =============================== -->
       
   113     <!-- Temporary variable and sequence -->
       
   114     <!-- =============================== -->
       
   115     <xs:element name="tempVariable">
       
   116         <xs:annotation>
       
   117             <xs:documentation>
       
   118                 <![CDATA[
       
   119                 Defines a global temporary variable that can be used in all implementations.<br/>
       
   120                 <br/>
       
   121                 A temporary variable is an ordinary ConfML setting that can be used normally
       
   122                 in implementations. Only the most basic ConfML setting types are supported.
       
   123                 ]]>
       
   124             </xs:documentation>
       
   125         </xs:annotation>
       
   126         <xs:complexType>
       
   127             <xs:attribute name="ref" type="xs:string" use="required">
       
   128                 <xs:annotation>
       
   129                     <xs:documentation>
       
   130                         The ConfML setting reference of the temporary variable, e.g. 'TempFeature.SomeSetting'.
       
   131                     </xs:documentation>
       
   132                 </xs:annotation>
       
   133             </xs:attribute>
       
   134             <xs:attribute name="type" type="implml:tempVariableTypeType" use="optional">
       
   135                 <xs:annotation>
       
   136                     <xs:documentation>
       
   137                         The type of the temporary variable, defaults to 'string'.
       
   138                     </xs:documentation>
       
   139                 </xs:annotation>
       
   140             </xs:attribute>
       
   141             <xs:attribute name="value" type="xs:string" use="optional">
       
   142                 <xs:annotation>
       
   143                     <xs:documentation>
       
   144                         The initial value of the temporary variable, defaults to an empty string.
       
   145                     </xs:documentation>
       
   146                 </xs:annotation>
       
   147             </xs:attribute>
       
   148         </xs:complexType>
       
   149     </xs:element>
       
   150     
       
   151     <xs:simpleType name="tempVariableTypeType">
       
   152         <xs:restriction base="xs:string">
       
   153             <xs:enumeration value="string"/>
       
   154             <xs:enumeration value="int"/>
       
   155             <xs:enumeration value="real"/>
       
   156             <xs:enumeration value="boolean"/>
       
   157         </xs:restriction>
       
   158     </xs:simpleType>
       
   159     
       
   160     <xs:element name="tempVariableSequence">
       
   161         <xs:annotation>
       
   162             <xs:documentation>
       
   163                 Defines a global temporary variable sequence that can be used in all implementations.
       
   164             </xs:documentation>
       
   165         </xs:annotation>
       
   166         <xs:complexType>
       
   167             <xs:sequence>
       
   168                 <xs:element name="tempVariable" type="implml:tempVariableSequenceSubType"
       
   169                             minOccurs="1" maxOccurs="unbounded">
       
   170                     <xs:annotation>
       
   171                         <xs:documentation>
       
   172                             Defines a sub-setting for the temporary variable sequence.
       
   173                         </xs:documentation>
       
   174                     </xs:annotation>
       
   175                 </xs:element>
       
   176             </xs:sequence>
       
   177             <xs:attribute name="ref" type="xs:string" use="required"/>
       
   178         </xs:complexType>
       
   179     </xs:element>
       
   180     
       
   181     <xs:complexType name="tempVariableSequenceSubType">
       
   182         <xs:attribute name="ref" type="xs:string" use="required">
       
   183             <xs:annotation>
       
   184                 <xs:documentation>
       
   185                     The ConfML setting reference of the temporary variable, e.g. 'SomeSubSetting'.
       
   186                 </xs:documentation>
       
   187             </xs:annotation>
       
   188         </xs:attribute>
       
   189         <xs:attribute name="type" type="implml:tempVariableTypeType" use="optional">
       
   190             <xs:annotation>
       
   191                 <xs:documentation>
       
   192                     The type of the sub-setting, defaults to 'string'.
       
   193                 </xs:documentation>
       
   194             </xs:annotation>
       
   195         </xs:attribute>
       
   196     </xs:complexType>
       
   197     
       
   198     
       
   199     <!-- =========================== -->
       
   200     <!-- Setting references override -->
       
   201     <!-- =========================== -->
       
   202     <xs:element name="settingRefsOverride">
       
   203         <xs:annotation>
       
   204             <xs:documentation>
       
   205                 <![CDATA[
       
   206                 Defines setting reference overrides for the implementations inside the container.<br/>
       
   207                 <br/>
       
   208                 The override can either be a list of setting refences, or it can specify that setting
       
   209                 references are irrelevant for implementation execution.
       
   210                 ]]>
       
   211             </xs:documentation>
       
   212         </xs:annotation>
       
   213         <xs:complexType>
       
   214             <xs:sequence>
       
   215                 <xs:element name="settingRef" type="implml:settingRefType"
       
   216                             minOccurs="0" maxOccurs="unbounded">
       
   217                     <xs:annotation>
       
   218                         <xs:documentation>
       
   219                             Specifies a single setting reference in the setting reference list.
       
   220                         </xs:documentation>
       
   221                     </xs:annotation>
       
   222                 </xs:element>
       
   223             </xs:sequence>
       
   224             <xs:attribute name="refsIrrelevant" use="optional">
       
   225                 <xs:annotation>
       
   226                     <xs:documentation>
       
   227                         Specifies that setting references are irrelevant for the execution of the
       
   228                         implementation inside the container (i.e. they are never filtered out
       
   229                         based on setting references).
       
   230                     </xs:documentation>
       
   231                 </xs:annotation>
       
   232                 <xs:simpleType>
       
   233                     <xs:restriction base="xs:string">
       
   234                         <xs:enumeration value="true"/>
       
   235                     </xs:restriction>
       
   236                 </xs:simpleType>
       
   237             </xs:attribute>
       
   238         </xs:complexType>
       
   239     </xs:element>
       
   240     
       
   241     <xs:complexType name="settingRefType">
       
   242         <xs:attribute name="value" type="xs:string" use="required"/>
       
   243     </xs:complexType>
       
   244     
       
   245     
       
   246     <!-- ========================== -->
       
   247     <!-- Output directory overrides -->
       
   248     <!-- ========================== -->
       
   249     <xs:element name="outputRootDir">
       
   250         <xs:annotation>
       
   251             <xs:documentation>
       
   252                 Overrides the output root directory of the implementations inside the container.
       
   253                 This can be used e.g. to always generate output under \epoc32\data\
       
   254             </xs:documentation>
       
   255         </xs:annotation>
       
   256         <xs:complexType>
       
   257             <xs:attribute name="value" use="required"/>
       
   258         </xs:complexType>
       
   259     </xs:element>
       
   260     <xs:element name="outputSubDir">
       
   261         <xs:annotation>
       
   262             <xs:documentation>
       
   263                 Overrides the output sub-directory of the implementations inside the container.
       
   264             </xs:documentation>
       
   265         </xs:annotation>
       
   266         <xs:complexType>
       
   267             <xs:attribute name="value" use="required"/>
       
   268         </xs:complexType>
       
   269     </xs:element>
       
   270     
       
   271 </xs:schema>