cvs: pear /XML_Transformer/Transformer/Namespace DocBook.php
| From: | Sebastian Bergmann | Date: | Sun, 29 Sep 2002 14:02:20 +0000 |
| Subject: | cvs: pear /XML_Transformer/Transformer/Namespace DocBook.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-6751@lists.php.net to get a copy of this message | ||
sebastian Sun Sep 29 10:02:20 2002 EDT
Modified files:
/pear/XML_Transformer/Transformer/Namespace DocBook.php
Log:
Make <graphic> actually work. Add width='x', height='y' support to
<graphic> tag.
Index: pear/XML_Transformer/Transformer/Namespace/DocBook.php
diff -u pear/XML_Transformer/Transformer/Namespace/DocBook.php:1.14
pear/XML_Transformer/Transformer/Namespace/DocBook.php:1.15
--- pear/XML_Transformer/Transformer/Namespace/DocBook.php:1.14 Sun Sep 29 06:28:00 2002
+++ pear/XML_Transformer/Transformer/Namespace/DocBook.php Sun Sep 29 10:02:20 2002
@@ -13,7 +13,7 @@
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
//
-// $Id: DocBook.php,v 1.14 2002/09/29 10:28:00 sebastian Exp $
+// $Id: DocBook.php,v 1.15 2002/09/29 14:02:20 sebastian Exp $
//
require_once 'XML/Transformer/Namespace.php';
@@ -118,7 +118,7 @@
*
* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
* @author Kristian Köhntopp <kris@koehntopp.de>
-* @version $Revision: 1.14 $
+* @version $Revision: 1.15 $
* @access public
*/
class XML_Transformer_Namespace_DocBook extends XML_Transformer_Namespace {
@@ -521,10 +521,12 @@
*/
function start_graphic($attributes) {
return sprintf(
- '<img alt="%s" border="0" src="%s" />',
+ '<img alt="%s" border="0" src="%s"%s%s/>',
- isset($attributes['srccredit']) ? $attributes['srccredit'] :
'',
- isset($attributes['fileref']) ? $attributes['fileref'] :
''
+ isset($attributes['srccredit']) ? $attributes['srccredit']
: '',
+ isset($attributes['fileref']) ? $attributes['fileref']
: '',
+ isset($attributes['width']) ? ' width="' .
$attributes['width'] . '"' : '',
+ isset($attributes['height']) ? ' height="' .
$attributes['height'] . '"' : ''
);
}
@@ -537,7 +539,7 @@
* @access public
*/
function end_graphic($cdata) {
- return '';
+ return $cdata;
}
// }}}