Changeset 302
- Timestamp:
- 02/28/07 16:47:04 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/xml/stubXMLPagePostInterceptor.php
r294 r302 32 32 */ 33 33 protected $response; 34 /**35 * list of callbacks36 *37 * @var array38 */39 protected $callbacks = array();40 34 41 35 /** … … 47 41 stubXMLXIncludeStreamWrapper::setIncludePath(stubConfig::getConfigPath() . '/xml/pages/txt'); 48 42 stubXMLXIncludeStreamWrapper::setCachePath(stubConfig::getCachePath()); 49 $xslProcessor = new stubXSLProcessor();50 $this->callbacks['image'] = new stubXSLImageDimensions(stubXMLStreamWriterFactory::createAsAvailable());51 $this->callbacks['image']->setPath(getcwd());52 $xslProcessor->registerCallback('image', $this->callbacks['image']);53 $xslProcessor->importXSLStylesheet(DOMDocument::load(stubFactory::getResourceURI('xsl/masterXInclude.xsl')));54 stubXMLXIncludeStreamWrapper::setXSLProcessor($xslProcessor);55 43 } 56 44 … … 72 60 // first we create the xsl with the master.xsl 73 61 $xslProcessor = new stubXSLProcessor(); 74 $xslProcessor->registerCallback('image', $this->callbacks['image']); 62 $image = new stubXSLImageDimensions(stubXMLStreamWriterFactory::createAsAvailable()); 63 $image->setPath(getcwd()); 64 $xslProcessor->registerCallback('image', $image); 75 65 $xslProcessor->importXSLStylesheet(DOMDocument::load(stubFactory::getResourceURI('xsl/master.xsl'))); 76 77 66 $page = $this->response->getPage(); 78 67 $xslProcessor->setParameter('', 'page', $page->getProperty('name')); 68 // use same xsl processor for the xincludes 69 stubXMLXIncludeStreamWrapper::setXSLProcessor($xslProcessor); 70 79 71 if ($page->hasProperty('skin') == true) { 80 72 $skin = $page->getProperty('skin');
