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

        $this->registerCallbacks();
        $bytes = $this->xsltProcessor->transformToURI($this->document, $uri);
        if (false === $bytes) {
            throw new XslProcessorException($this->createMessage());
        }

        return $bytes;
    }
public function toUri(string $uri): int
    {
        if (null === $this->document) {
            throw new XslProcessorException(
                    'Can not transform, set document or xml file to transform first'
            );
        }

        $this->registerCallbacks();
        $bytes = $this->xsltProcessor->transformToURI($this->document, $uri);
        if (false === $bytes) {
            throw new XslProcessorException($this->createMessage());
        }

        return $bytes;
    }
public function toUri ( string $ uri ) : int { if ( null === $ this -> document ) { throw new XslProcessorException ( 'Can not transform, set document or xml file to transform first' ) ; } $ this -> registerCallbacks ( ) ; $ bytes = $ this -> xsltProcessor -> transformToURI ( $ this -> document , $ uri ) ; if ( false === $ bytes ) { throw new XslProcessorException ( $ this -> createMessage ( ) ) ; } return $ bytes ; }
transforms the document and saves it to the given uri, returns the
amount of bytes written

@param   string  $uri
@return  int
@throws  \stubbles\xml\xsl\XslProcessorException
transforms the document and saves it to the given uri returns the amount of bytes written