public function toDoc(): \DOMDocument
    {
        if (null === $this->document) {
            throw new XslProcessorException(
                    'Can not transform, set document or xml file to transform first'
            );
        }

        $this->registerCallbacks();
        $result = $this->xsltProcessor->transformToDoc($this->document);
        if (false === $result) {
            throw new XslProcessorException($this->createMessage());
        }

        return $result;
    }
public function toDoc(): \DOMDocument
    {
        if (null === $this->document) {
            throw new XslProcessorException(
                    'Can not transform, set document or xml file to transform first'
            );
        }

        $this->registerCallbacks();
        $result = $this->xsltProcessor->transformToDoc($this->document);
        if (false === $result) {
            throw new XslProcessorException($this->createMessage());
        }

        return $result;
    }
public function toDoc ( ) : \ DOMDocument { if ( null === $ this -> document ) { throw new XslProcessorException ( 'Can not transform, set document or xml file to transform first' ) ; } $ this -> registerCallbacks ( ) ; $ result = $ this -> xsltProcessor -> transformToDoc ( $ this -> document ) ; if ( false === $ result ) { throw new XslProcessorException ( $ this -> createMessage ( ) ) ; } return $ result ; }
transoforms the document into another DOMDocument

@return  \DOMDocument
@throws  \stubbles\xml\xsl\XslProcessorException
transoforms the document into another DOMDocument