function tagend_extension_global($attr, $data)
 {
     $global = new CodeGen_PECL_Element_Global();
     if (isset($attr["name"])) {
         $err = $global->setName($attr["name"]);
         if (PEAR::isError($err)) {
             return $err;
         }
     } else {
         return PEAR::raiseError("name attribut for global missing");
     }
     if (isset($attr["type"])) {
         $err = $global->setType($attr["type"]);
         if (PEAR::isError($err)) {
             return $err;
         }
     } else {
         return PEAR::raiseError("type attribut for global missing");
     }
     if (isset($attr["value"])) {
         $err = $global->setValue($attr["value"]);
         if (PEAR::isError($err)) {
             return $err;
         }
     }
     if (isset($attr["if"])) {
         $global->setIfCondition($attr["if"]);
     }
     $groupIfs = $this->getGroupAttributeStack("if");
     if (is_array($groupIfs)) {
         foreach ($groupIfs as $if) {
             $global->addIfCondition($if);
         }
     }
     return $this->extension->addGlobal($global);
 }