]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/decorator/xml/class_XmlCompactorDecorator.php
'public static final' is correct
[core.git] / inc / classes / main / decorator / xml / class_XmlCompactorDecorator.php
index 0e191c98e0cf5116c8db4b8773e425af9bb5b7e0..9ce0172ccdd9c19d9238f2b86d7f291e313f37c8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -38,7 +38,7 @@ class XmlCompactorDecorator extends BaseDecorator implements Parseable {
         * @param       $innerParserInstance    A Parseable instance
         * @return      $parserInstance         An instance of this parser
         */
-       public final static function createXmlCompactorDecorator (Parseable $innerParserInstance) {
+       public static final function createXmlCompactorDecorator (Parseable $innerParserInstance) {
                // Get a new instance
                $parserInstance = new XmlCompactorDecorator();
 
@@ -63,6 +63,9 @@ class XmlCompactorDecorator extends BaseDecorator implements Parseable {
         * @throws      XmlCompactorDecoratorException  If an XML error was found
         */
        public function parseXmlContent ($content) {
+               // Remove all comments for better compacting
+               $content = $this->getParserInstance()->getTemplateInstance()->compactContent($content);
+
                // Parse the content
                $this->getParserInstance()->parseXmlContent($content);
        }