public static function validateQtiXml($qti)
    {
        
        $dom = self::loadQtiXml($qti);
        $returnValue = $dom->saveXML();

        $parserValidator = new Parser($returnValue);
        $parserValidator->validate();
        if(!$parserValidator->isValid()) {
            common_Logger::w('Invalid QTI output: ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
            throw new QtiModelException('invalid QTI item XML ' . PHP_EOL . ' ' . $parserValidator->displayErrors());
        }
    }