Changeset 1907

Show
Ignore:
Timestamp:
05/03/07 17:10:56 (21 months ago)
Author:
david
Message:

finished work on XSL support in config files. an XSL stylesheet may now also be embedded in the document and referred to by it's ID in the processing instruction. also refactored the XSDs a lot, they now use inheritance for the root elements and contain a first extension point for foreign namespaces inside <configurations>. closes #509 and refs #515

Location:
branches/0.11/src/config
Files:
17 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/src/config/AgaviXmlConfigParser.class.php

    r1906 r1907  
    123123     
    124124    // if there is no xmlns declaration on the root element, we gotta add it. must do after xinclude() to maintain BC 
    125     if(!$doc->documentElement->namespaceURI) { 
     125    if($doc->documentElement && !$doc->documentElement->namespaceURI) { 
    126126      $doc->documentElement->setAttribute('xmlns', self::XML_NAMESPACE); 
    127127       
     
    150150        if(strpos($href, '#') === 0) { 
    151151          // embedded XSL 
    152           throw new AgaviParseException('Embedded XSL stylesheets are not supported yet.'); 
     152          $stylesheets = $this->xpath->query("//*[@id='" . substr($href, 1) . "']", $doc); 
     153          if($stylesheets->length) { 
     154            $xsl = new DomDocument(); 
     155            $xsl->appendChild($xsl->importNode($stylesheets->item(0), true)); 
     156            if(libxml_get_last_error() !== false) { 
     157              $errors = array(); 
     158              foreach(libxml_get_errors() as $error) { 
     159                $errors[] = $error->message; 
     160              } 
     161              libxml_clear_errors(); 
     162              libxml_use_internal_errors($luie); 
     163              throw new AgaviParseException( 
     164                sprintf( 
     165                  'Configuration file "%s" could not be parsed due to the following error%s that occured while loading the specified XSL stylesheet "%s": ' . "\n\n%s",  
     166                  $config,  
     167                  count($errors) > 1 ? 's' : '',  
     168                  $href, 
     169                  implode("\n", $errors) 
     170                ) 
     171              ); 
     172            } 
     173          } else { 
     174            throw new AgaviParseException( 
     175              sprintf( 
     176                'Configuration file "%s" could not be parsed because the inline stylesheet "%s" referenced in the "xml-stylesheet" processing instruction could not be found in the document.',  
     177                $config,  
     178                $href 
     179              ) 
     180            ); 
     181          } 
    153182        } else { 
    154183          // references an xsl file 
     
    229258      } 
    230259    } 
    231     $this->xpath->registerNamespace('agavi', $doc->documentElement->namespaceURI); 
    232      
    233     // remove top-level <sandbox> elements 
    234     $sandboxes = $this->xpath->query('/agavi:configurations/agavi:sandbox', $doc); 
    235     foreach($sandboxes as $sandbox) { 
    236       $sandbox->parentNode->removeChild($sandbox); 
     260     
     261    if($doc->documentElement) { 
     262      $this->xpath->registerNamespace('agavi', $doc->documentElement->namespaceURI); 
     263     
     264      // remove top-level <sandbox> elements 
     265      $sandboxes = $this->xpath->query('/agavi:configurations/agavi:sandbox', $doc); 
     266      foreach($sandboxes as $sandbox) { 
     267        $sandbox->parentNode->removeChild($sandbox); 
     268      } 
    237269    } 
    238270     
     
    264296     
    265297    $rootRes = new AgaviConfigValueHolder(); 
    266  
    267     $this->parseNodes(array($doc->documentElement), $rootRes); 
    268  
     298     
     299    if($doc->documentElement) { 
     300      $this->parseNodes(array($doc->documentElement), $rootRes); 
     301    } 
     302     
    269303    return $rootRes; 
    270304  } 
  • branches/0.11/src/config/xsd/autoload.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="autoloads" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16         </xs:complexType> 
    17       </xs:element> 
    18     </xs:sequence> 
    19     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration"> 
     9        <xs:group ref="autoloads" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2012  </xs:complexType> 
    2113 
  • branches/0.11/src/config/xsd/caching.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="cachings" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16           <xs:attribute name="context" type="xs:string" /> 
    17         </xs:complexType> 
    18       </xs:element> 
    19     </xs:sequence> 
    20     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:group ref="cachings" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2112  </xs:complexType> 
    2213 
  • branches/0.11/src/config/xsd/compile.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="compiles" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16         </xs:complexType> 
    17       </xs:element> 
    18     </xs:sequence> 
    19     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration"> 
     9        <xs:group ref="compiles" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2012  </xs:complexType> 
    2113 
  • branches/0.11/src/config/xsd/config_handlers.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/> 
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="handlers" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16         </xs:complexType> 
    17       </xs:element> 
    18     </xs:sequence> 
    19     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration"> 
     9        <xs:group ref="handlers" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2012  </xs:complexType> 
    2113 
  • branches/0.11/src/config/xsd/databases.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="databases" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16         </xs:complexType> 
    17       </xs:element> 
    18     </xs:sequence> 
    19     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration"> 
     9        <xs:group ref="databases" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2012  </xs:complexType> 
    2113 
  • branches/0.11/src/config/xsd/default_tags.xsd

    r1903 r1907  
    2020  </xs:simpleType> 
    2121 
     22  <xs:element name="configurations" type="configurations" /> 
     23  <xs:complexType name="configurations"> 
     24    <xs:sequence> 
     25      <xs:any namespace="##other" minOccurs="0" processContents="lax" /> 
     26      <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
     27      <xs:element name="configuration" type="configuration" minOccurs="0" maxOccurs="unbounded" /> 
     28    </xs:sequence> 
     29    <xs:attribute name="parent" type="xs:string" /> 
     30  </xs:complexType> 
     31  <xs:complexType name="base_configuration"> 
     32    <xs:attribute name="environment" type="xs:string" /> 
     33  </xs:complexType> 
     34  <xs:complexType name="base_configuration_with_context"> 
     35    <xs:complexContent> 
     36      <xs:extension base="base_configuration"> 
     37        <xs:attribute name="context" type="xs:string" /> 
     38      </xs:extension> 
     39    </xs:complexContent> 
     40  </xs:complexType> 
     41   
    2242  <xs:complexType name="sandbox"> 
    2343    <xs:sequence minOccurs="1" maxOccurs="1"> 
    24       <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="skip" /> 
     44      <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" /> 
    2545    </xs:sequence> 
    2646  </xs:complexType> 
  • branches/0.11/src/config/xsd/factories.xsd

    r1903 r1907  
    1111  </xs:complexType> 
    1212   
    13   <xs:element name="configurations" type="configurations" /> 
    14   <xs:complexType name="configurations"> 
    15     <xs:sequence> 
    16       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    17       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    18         <xs:complexType> 
    19           <xs:all> 
    20             <xs:element type="factorydef" minOccurs="0" name="controller" /> 
    21             <xs:element type="factorydef" minOccurs="0" name="database_manager" /> 
    22             <xs:element type="factorydef" minOccurs="0" name="dispatch_filter" /> 
    23             <xs:element type="factorydef" minOccurs="0" name="execution_container" /> 
    24             <xs:element type="factorydef" minOccurs="0" name="execution_filter" /> 
    25             <xs:element type="factorydef" minOccurs="0" name="filter_chain" /> 
    26             <xs:element type="factorydef" minOccurs="0" name="logger_manager" /> 
    27             <xs:element type="factorydef" minOccurs="0" name="request" /> 
    28             <xs:element type="factorydef" minOccurs="0" name="response" /> 
    29             <xs:element type="factorydef" minOccurs="0" name="routing" /> 
    30             <xs:element type="factorydef" minOccurs="0" name="security_filter" /> 
    31             <xs:element type="factorydef" minOccurs="0" name="storage" /> 
    32             <xs:element type="factorydef" minOccurs="0" name="translation_manager" /> 
    33             <xs:element type="factorydef" minOccurs="0" name="user" /> 
    34             <xs:element type="factorydef" minOccurs="0" name="validation_manager" /> 
    35           </xs:all> 
    36           <xs:attribute name="environment" type="xs:string" /> 
    37           <xs:attribute name="context" type="xs:string" /> 
    38         </xs:complexType> 
    39       </xs:element> 
    40     </xs:sequence> 
    41     <xs:attribute name="parent" type="xs:string" /> 
     13  <xs:complexType name="configuration"> 
     14    <xs:complexContent> 
     15      <xs:extension base="base_configuration_with_context"> 
     16        <xs:all> 
     17          <xs:element type="factorydef" minOccurs="0" name="controller" /> 
     18          <xs:element type="factorydef" minOccurs="0" name="database_manager" /> 
     19          <xs:element type="factorydef" minOccurs="0" name="dispatch_filter" /> 
     20          <xs:element type="factorydef" minOccurs="0" name="execution_container" /> 
     21          <xs:element type="factorydef" minOccurs="0" name="execution_filter" /> 
     22          <xs:element type="factorydef" minOccurs="0" name="filter_chain" /> 
     23          <xs:element type="factorydef" minOccurs="0" name="logger_manager" /> 
     24          <xs:element type="factorydef" minOccurs="0" name="request" /> 
     25          <xs:element type="factorydef" minOccurs="0" name="response" /> 
     26          <xs:element type="factorydef" minOccurs="0" name="routing" /> 
     27          <xs:element type="factorydef" minOccurs="0" name="security_filter" /> 
     28          <xs:element type="factorydef" minOccurs="0" name="storage" /> 
     29          <xs:element type="factorydef" minOccurs="0" name="translation_manager" /> 
     30          <xs:element type="factorydef" minOccurs="0" name="user" /> 
     31          <xs:element type="factorydef" minOccurs="0" name="validation_manager" /> 
     32        </xs:all> 
     33      </xs:extension> 
     34    </xs:complexContent> 
    4235  </xs:complexType> 
    4336 
  • branches/0.11/src/config/xsd/filters.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:group ref="filters" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16           <xs:attribute name="context" type="xs:string" /> 
    17         </xs:complexType> 
    18       </xs:element> 
    19     </xs:sequence> 
    20     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:group ref="filters" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2112  </xs:complexType> 
    2213 
  • branches/0.11/src/config/xsd/logging.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/> 
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
    13             <xs:group ref="loggers" minOccurs="0" /> 
    14             <xs:group ref="appenders" minOccurs="0" /> 
    15             <xs:group ref="layouts" minOccurs="0" /> 
    16           </xs:sequence> 
    17           <xs:attribute name="environment" type="xs:string" /> 
    18           <xs:attribute name="context" type="xs:string" /> 
    19         </xs:complexType> 
    20       </xs:element> 
    21     </xs:sequence> 
    22     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
     10          <xs:group ref="loggers" minOccurs="0" /> 
     11          <xs:group ref="appenders" minOccurs="0" /> 
     12          <xs:group ref="layouts" minOccurs="0" /> 
     13        </xs:sequence> 
     14      </xs:extension> 
     15    </xs:complexContent> 
    2316  </xs:complexType> 
    2417 
  • branches/0.11/src/config/xsd/module.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:group ref="moduleEntries" /> 
    13           <xs:attribute name="environment" type="xs:string" /> 
    14         </xs:complexType> 
    15       </xs:element> 
    16     </xs:sequence> 
    17     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:group ref="module_entries" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    1812  </xs:complexType> 
    19   <xs:group name="moduleEntries"> 
     13   
     14  <xs:group name="module_entries"> 
    2015    <xs:all> 
    2116      <xs:element name="enabled" type="xs:string" /> 
  • branches/0.11/src/config/xsd/output_types.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:element name="output_types" type="output_types" minOccurs="0" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16           <xs:attribute name="context" type="xs:string" /> 
    17         </xs:complexType> 
    18       </xs:element> 
    19     </xs:sequence> 
    20     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:group ref="output_types" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
    2112  </xs:complexType> 
    2213 
     14  <xs:group name="output_types"> 
     15    <xs:sequence> 
     16      <xs:element name="output_types" type="output_types" /> 
     17    </xs:sequence> 
     18  </xs:group> 
     19   
    2320  <xs:complexType name="output_types"> 
    2421    <xs:sequence> 
  • branches/0.11/src/config/xsd/rbac_definitions.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence> 
    13             <xs:element name="roles" minOccurs="0" type="roles" /> 
    14           </xs:sequence> 
    15           <xs:attribute name="environment" type="xs:string" /> 
    16           <xs:attribute name="context" type="xs:string" /> 
    17         </xs:complexType> 
    18       </xs:element> 
    19     </xs:sequence> 
    20     <xs:attribute name="parent" type="xs:string" /> 
    21   </xs:complexType> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:group ref="roles" /> 
     10      </xs:extension> 
     11    </xs:complexContent> 
     12  </xs:complexType> 
    2213 
     14  <xs:group name="roles"> 
     15    <xs:sequence> 
     16      <xs:element name="roles" type="roles" /> 
     17    </xs:sequence> 
     18  </xs:group> 
     19   
    2320  <xs:complexType name="roles"> 
    2421    <xs:sequence> 
  • branches/0.11/src/config/xsd/routing.xsd

    r1903 r1907  
    1010  </xs:simpleType> 
    1111 
    12   <xs:element name="configurations" type="configurations" /> 
    13   <xs:complexType name="configurations"> 
    14     <xs:sequence> 
    15       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    16       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    17         <xs:complexType> 
    18           <xs:sequence> 
    19             <xs:group ref="routes" /> 
    20           </xs:sequence> 
    21           <xs:attribute name="environment" type="xs:string" /> 
    22           <xs:attribute name="context" type="xs:string" /> 
    23         </xs:complexType> 
    24       </xs:element> 
    25     </xs:sequence> 
    26     <xs:attribute name="parent" type="xs:string" /> 
     12  <xs:complexType name="configuration"> 
     13    <xs:complexContent> 
     14      <xs:extension base="base_configuration_with_context"> 
     15        <xs:group ref="routes" /> 
     16      </xs:extension> 
     17    </xs:complexContent> 
    2718  </xs:complexType> 
    2819 
  • branches/0.11/src/config/xsd/settings.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
    13             <xs:group ref="system_actions" minOccurs="0" /> 
    14             <xs:group ref="settings" minOccurs="0" maxOccurs="unbounded" /> 
    15             <xs:group ref="exception_templates" minOccurs="0" /> 
    16           </xs:sequence> 
    17           <xs:attribute name="environment" type="xs:string" /> 
    18         </xs:complexType> 
    19       </xs:element> 
    20     </xs:sequence> 
    21     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration"> 
     9        <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
     10          <xs:group ref="system_actions" minOccurs="0" /> 
     11          <xs:group ref="settings" minOccurs="0" maxOccurs="unbounded" /> 
     12          <xs:group ref="exception_templates" minOccurs="0" /> 
     13        </xs:sequence> 
     14      </xs:extension> 
     15    </xs:complexContent> 
    2216  </xs:complexType> 
    2317 
  • branches/0.11/src/config/xsd/translation.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/>   
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:all> 
    13             <xs:element name="translators" type="translators" minOccurs="0"/> 
    14             <xs:element name="available_locales" type="available_locales" minOccurs="0"/> 
    15           </xs:all> 
    16           <xs:attribute name="environment" type="xs:string" /> 
    17           <xs:attribute name="context" type="xs:string" /> 
    18         </xs:complexType> 
    19       </xs:element> 
    20     </xs:sequence> 
    21     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:all> 
     10          <xs:element name="translators" type="translators" minOccurs="0"/> 
     11          <xs:element name="available_locales" type="available_locales" minOccurs="0"/> 
     12        </xs:all> 
     13      </xs:extension> 
     14    </xs:complexContent> 
    2215  </xs:complexType> 
    2316 
  • branches/0.11/src/config/xsd/validators.xsd

    r1903 r1907  
    44  <xs:include schemaLocation="default_tags.xsd"/> 
    55 
    6   <xs:element name="configurations" type="configurations" /> 
    7   <xs:complexType name="configurations"> 
    8     <xs:sequence> 
    9       <xs:element name="sandbox" type="sandbox" minOccurs="0" /> 
    10       <xs:element name="configuration" minOccurs="0" maxOccurs="unbounded"> 
    11         <xs:complexType> 
    12           <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
    13             <xs:group ref="validators" minOccurs="0" maxOccurs="unbounded" /> 
    14             <xs:group ref="validator_definitions" minOccurs="0" /> 
    15           </xs:sequence> 
    16           <xs:attribute name="environment" type="xs:string" /> 
    17           <xs:attribute name="context" type="xs:string" /> 
    18         </xs:complexType> 
    19       </xs:element> 
    20     </xs:sequence> 
    21     <xs:attribute name="parent" type="xs:string" /> 
     6  <xs:complexType name="configuration"> 
     7    <xs:complexContent> 
     8      <xs:extension base="base_configuration_with_context"> 
     9        <xs:sequence minOccurs="0" maxOccurs="unbounded" > 
     10          <xs:group ref="validators"