/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/common.php

  • Committer: Suren A. Chilingaryan
  • Date: 2009-01-31 04:54:46 UTC
  • Revision ID: csa@dside.dyndns.org-20090131045446-e2u52332uayw5u9m
Various fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        throw new ADEIException(translate("Failed to create DOM document"));
76
76
    }
77
77
    
 
78
    // HTML output is evil, it will change <br/> to <br>. And XHTML is not supported yet.
 
79
    $outputs = $xsldoc->getElementsByTagNameNS("http://www.w3.org/1999/XSL/Transform", "output");
 
80
    if ($outputs->length) {
 
81
        $node = $outputs->item(0);
 
82
        if (!strcasecmp($node->getAttribute("method"), "html")) {
 
83
            $node->setAttribute("method", "xml");
 
84
/*      
 
85
    <xsl:output method="xml" version="1.0" encoding="utf-8" 
 
86
        media-type="text/html" omit-xml-declaration="yes"
 
87
        doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"
 
88
        doctype-system="http://www.w3.org/TR/REC-html40/loose.dtd"/>
 
89
*/
 
90
        }       
 
91
    }
 
92
    
78
93
    $xh = new XSLTProcessor();
79
94
    if ($xh) {
80
95
        if (!@$xh->importStylesheet($xsldoc)) {