public function render($documentContent, $stylesheetContents = array(), $colorPaletteContent = null)
    {
        $colorPalette = new ColorPalette((array) $this->configurationLoader->createColorPalette());
        
        if($colorPaletteContent)
        {
            $colorPalette->merge($this->parseColorPalette($colorPaletteContent));
        }
        
        $this->document->setColorPalette($colorPalette);
        
        $complexAttributeFactory = $this->configurationLoader->createComplexAttributeFactory();
        
        $this->getDocument()->setComplexAttributeFactory($complexAttributeFactory);
        $fontDefinitions = $this->configurationLoader->createFontRegistry($this->engineType);
        $this->getDocument()->addFontDefinitions($fontDefinitions);
        $this->getDocumentParser()->setComplexAttributeFactory($complexAttributeFactory);
        $this->getDocumentParser()->setNodeFactory($this->configurationLoader->createNodeFactory());

        $stylesheetConstraint = $this->retrieveStylesheetConstraint($stylesheetContents);

        foreach($this->stringFilters as $filter)
        {
            $documentContent = $filter->filter($documentContent);
        }

        $pageCollection = $this->getDocumentParser()->parse($documentContent, $stylesheetConstraint);
        $this->updateStylesheetConstraintCacheIfNecessary($stylesheetConstraint);
        unset($stylesheetConstraint);

        return $this->doRender($pageCollection);
    }