public function schemaValidate(DOMDocument $doc, $xsdName)
    {
        $errors = array();
        set_error_handler(function ($errno, $errstr) use (&$errors) {
            $errors[] = "'$errstr' [Errno $errno]";
        });
        $cfg = Mage::helper('radial_core')->getConfigModel();
        $isValid = $doc->schemaValidate(Mage::getBaseDir() . DS . $cfg->apiXsdPath . DS . $xsdName);
        restore_error_handler();
        if (!$isValid) {
            $msg = sprintf(
                "[ %s ] Schema validation failed, encountering the following errors:\n%s",
                __CLASS__,
                implode("\n", $errors)
            );
            throw new Radial_Core_Exception_InvalidXml($msg);
        }
        return $this;
    }
public function schemaValidate(DOMDocument $doc, $xsdName)
    {
        $errors = array();
        set_error_handler(function ($errno, $errstr) use (&$errors) {
            $errors[] = "'$errstr' [Errno $errno]";
        });
        $cfg = Mage::helper('radial_core')->getConfigModel();
        $isValid = $doc->schemaValidate(Mage::getBaseDir() . DS . $cfg->apiXsdPath . DS . $xsdName);
        restore_error_handler();
        if (!$isValid) {
            $msg = sprintf(
                "[ %s ] Schema validation failed, encountering the following errors:\n%s",
                __CLASS__,
                implode("\n", $errors)
            );
            throw new Radial_Core_Exception_InvalidXml($msg);
        }
        return $this;
    }
public function schemaValidate ( DOMDocument $ doc , $ xsdName ) { $ errors = array ( ) ; set_error_handler ( function ( $ errno , $ errstr ) use ( & $ errors ) { $ errors [ ] = "'$errstr' [Errno $errno]" ; } ) ; $ cfg = Mage :: helper ( 'radial_core' ) -> getConfigModel ( ) ; $ isValid = $ doc -> schemaValidate ( Mage :: getBaseDir ( ) . DS . $ cfg -> apiXsdPath . DS . $ xsdName ) ; restore_error_handler ( ) ; if ( ! $ isValid ) { $ msg = sprintf ( "[ %s ] Schema validation failed, encountering the following errors:\n%s" , __CLASS__ , implode ( "\n" , $ errors ) ) ; throw new Radial_Core_Exception_InvalidXml ( $ msg ) ; } return $ this ; }
Validates the DOM against a validation schema,
which should be a full path to an xsd for this DOMDocument.

@param DomDocument $doc The document to validate
@param string $xsdName xsd file basename with which to validate the doc
@throws Radial_Core_Exception_InvalidXml when the schema is invalid
@return self
Validates the DOM against a validation schema which should be a full path to an xsd for this DOMDocument .