Changeset 839

Show
Ignore:
Timestamp:
08/15/07 15:31:11 (1 year ago)
Author:
mikey
Message:

move decision of output format and output declarations to skin template

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/config/xml/pages/skin/default.xml

    r838 r839  
    1 <stub:document xmlns:stub="http://stubbles.net/stub" method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
     1<stub:document xmlns:stub="http://stubbles.net/stub" method="xml" omit-xml-declaration="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    22  <html> 
    33    <head> 
  • trunk/src/main/php/net/stubbles/websites/xml/stubXMLPostInterceptor.php

    r712 r839  
    6969        $this->setXIncludeProcessor($xslProcessor); 
    7070 
    71         $skin = (($page->hasProperty('skin') == true) ? ($page->getProperty('skin')) : ('default')); 
     71        $skin = (($page->hasProperty('skin') === true) ? ($page->getProperty('skin')) : ('default')); 
    7272        $xslProcessor->setXMLDocument($this->createXMLSkinDocument($skin)); 
    7373        $resultXSL = $xslProcessor->transformToDoc(); 
     
    7878        $xslProcessor->importXSLStylesheet($resultXSL); 
    7979        $xslProcessor->setXMLDocument(DOMDocument::loadXML($response->getData())); 
    80         $response->replaceData($xslProcessor->transformToDoc()->saveXML()); 
     80        $response->replaceData($xslProcessor->transformToXML()); 
    8181        return true; 
    8282    } 
  • trunk/src/main/resources/xsl/stub.xsl

    r838 r839  
    1010    <ixsl:stylesheet version="1.0" exclude-result-prefixes="ixsl"> 
    1111      <ixsl:output> 
    12                 <xsl:copy-of select="method" /> 
    13                 <xsl:copy-of select="@doctype-public" /> 
    14                 <xsl:copy-of select="@doctype-system" /> 
    15             </ixsl:output> 
     12        <xsl:copy-of select="@method" /> 
     13        <xsl:copy-of select="@omit-xml-declaration" /> 
     14        <xsl:copy-of select="@doctype-public" /> 
     15        <xsl:copy-of select="@doctype-system" /> 
     16      </ixsl:output> 
    1617      <ixsl:template match="/"> 
    1718        <xsl:apply-templates select="node()"/>