I'm trying to automatically convert DocBook XML files into PDFs using
PHP and the XSLT extension. First step is to convert them into FO, but
I'm running into trouble with this script:
<?php
$xslt = xslt_create();
$xml = 'my_docbook_file.xml';
$xsl = '/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/fo/docbook.xsl';
$args = array();
$params = array(
'paper.type' => 'USletter',
'page.orientation' => 'portrait',
);
$html = xslt_process($xslt, $xml, $xsl, NULL, $args, $params);
if (!$html) {
die('XSLT processing error: '.xslt_error($xslt));
}
xslt_free($xslt);
echo $html;
?>
I get the following parse warnings, and the output error:
Warning: Sablotron error on line 244: variable 'page.orientation' not
found in /home/cmv/www/doc/index.php on line 15
Warning: Sablotron error on line 254: variable 'paper.type' not found
in /home/cmv/www/doc/index.php on line 15
Warning: Sablotron error on line 322: variable 'paper.type' not found
in /home/cmv/www/doc/index.php on line 15
Warning: Sablotron error on line 322: circular reference to variable
'page.width.portrait' in /home/cmv/www/doc/index.php on line 15
Warning: Sablotron error on line 190: variable 'page.height' not found
in /home/cmv/www/doc/index.php on line 15
XSLT processing error: variable 'page.height' not found
How do I pass those variables/parameters to the XSLT process? Has
someone else had experience with this?
(Cc me offlist in your replies, please.)
--
colin easydns com
at dot
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php