From 0135a20119867883ab8c57fb24b7535426233ca8 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sat, 24 Jul 2004 17:55:38 +0000 Subject: [PATCH] fix the OO example to make it do the same thing as the previous one # copied my personnal work by mistake git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164224 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../xslt/functions/xslt-set-sax-handlers.xml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/reference/xslt/functions/xslt-set-sax-handlers.xml b/reference/xslt/functions/xslt-set-sax-handlers.xml index aaf1391023..a0827e36a6 100644 --- a/reference/xslt/functions/xslt-set-sax-handlers.xml +++ b/reference/xslt/functions/xslt-set-sax-handlers.xml @@ -1,5 +1,5 @@ - + @@ -203,21 +203,21 @@ function end_document() function start_element($parser, $name, $attributes) { global $result,$tag; - $result .= "<".$name.">"; + $result .= "<". $name . ">"; $tag = $name; } function end_element($parser, $name) { global $result; - $result .= ""; + $result .= ""; } function characters($parser, $data) { global $result,$tag; - if($tag=="auteur") { - $data=strtoupper($data); + if ($tag == "auteur" ) { + $data = strtoupper($data); } $result .= $data; } @@ -261,22 +261,22 @@ class data_sax_handler { // complete reading the document } - function start_element($parser, $tagname, $attributes) { - $this->tag = $tagname; + function start_element($parser, $name, $attributes) { + $this->tag = $name; + $this->buffer .= "<" . $name . ">"; $this->attrs = $attributes; } - function end_element($parser, $tagname) + function end_element($parser, $name) { $this->tag = ''; + $this->buffer .= ""; } function characters($parser, $data) { - // Are we calling a PHP function ? - if ($this->tag == 'php') { - $function = $this->attrs['function']; - $data = $function($data); + if ($this->tag == 'auteur') { + $data = strtoupper($data); } $this->buffer .= $data; }