$temp_dir
$temp_dir : string
Holds an ODF-XSLT sylesheet and allows mutiple transformations to ODF using different XML documents
To use it, simply instanciate it, load it with a stylesheet (either an ODF zipfile containing XSLT stylesheets or an ODF document with ODF-XSLT markup) and call one of the transformto* functions with the XML data.
register_preprocessor(mixed $function, $user_data = null) : void
Register a preprocessor with the template engine. Preprocessor are in the form of function($source, &$ODFXSLTProcessor, &$user_data) and are executed in the order they are registered. They are called after a document has been loaded from the cache but before XSLT processing. Throws an exception on failure.
mixed | $function | A function in a format that is callable by PHP's call_user_func() |
$user_data |
register_postprocessor(mixed $function, $user_data = null) : void
Register a postprocessor with the template engine. Postprocessor are in the form of function($source, &$ODFXSLTProcessor, &$user_data) and are executed in the order they are registered. They are called after a document has been processed by the XSLT processor but before the result is saved or returned. Throws an exception on failure.
mixed | $function | A function in a format that is callable by PHP's call_user_func() |
$user_data |
save_meta( $zip) : void
Update meta.xml with the values from $this->meta. Note that if meta.xml contains duplicate elements this function will remove them all and replace them with a single value as specified by $this->meta.
See the constructor for teh list of affected meta elements.
$zip |
convert_to_xslt(string $contents) : string
Convert an ODF XML file to XSLT according to the ODF-XSLT markup (see documentation). Takes the XML as string and returns the XSLT as string
string | $contents | A single ODF XML file as text |
An XSLT document as text