mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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
This commit is contained in:
parent
6d8d5e3cb3
commit
0135a20119
1 changed files with 12 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.29 -->
|
||||
<refentry id='function.xslt-set-sax-handlers'>
|
||||
<refnamediv>
|
||||
|
@ -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 .= "</".$name.">";
|
||||
$result .= "</" . $name . ">";
|
||||
}
|
||||
|
||||
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 .= "</" . $name . ">";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue