Changeset 2634

Show
Ignore:
Timestamp:
07/31/08 16:03:34 (5 months ago)
Author:
impl
Message:

branches/david-xml_only_config_system (refs #519): Introduce core.skip_config_transformations directive to allow users to skip XSL transformations if they do not have the XSL extension enabled

Location:
branches/david-xml_only_config_system/src/config
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/david-xml_only_config_system/src/config/AgaviConfigCache.class.php

    r2631 r2634  
    298298    require($agaviDir . '/config/util/dom/AgaviXmlConfigDomProcessingInstruction.class.php'); 
    299299    require($agaviDir . '/config/util/dom/AgaviXmlConfigDomText.class.php'); 
    300     require($agaviDir . '/config/util/xsl/AgaviXmlConfigXsltProcessor.class.php'); 
    301  
     300    // extended XSL* classes 
     301    if(!AgaviConfig::get('core.skip_config_transformations', false)) { 
     302      if(!extension_loaded('xsl')) { 
     303        throw new AgaviConfigurationException('The XSL extension is required for performing transformations in the configuration system; transformations may be disabled by setting the core.skip_config_transformations directive'); 
     304      } 
     305      require($agaviDir . '/config/util/xsl/AgaviXmlConfigXsltProcessor.class.php'); 
     306    } 
     307     
    302308    // manually create our config_handlers.xml handler 
    303309    self::$handlers['config_handlers.xml'] = array( 
  • branches/david-xml_only_config_system/src/config/AgaviXmlConfigParser.class.php

    r2632 r2634  
    317317    $this->prepare(); 
    318318     
    319     // perform XSL transformations 
    320     $this->transform($transformationInfo); 
     319    if(!AgaviConfig::get('core.skip_config_transformations', false)) { 
     320      // perform XSL transformations 
     321      $this->transform($transformationInfo); 
     322    } 
    321323     
    322324    // validate against WXS/RNG/SCH 
     
    662664  public function validateSchematron(array $validationFiles = array()) 
    663665  { 
     666    if(AgaviConfig::get('core.skip_config_transformations', false)) { 
     667      return; 
     668    } 
     669     
    664670    // first, we load the schematron implementation. this is an XSL document that is used to transform a .sch file to another XSL document that is then used to transform the input document. the result is informational output about the validation, which in our case must be valid ISO SVRL, an XML schema validation reporting format 
    665671    $schematronIsoSvrlImplementation = new AgaviXmlConfigDomDocument();