0d933e45e2ad1f81156b45f3f0a6114045433c14
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2019 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) {
19 // http://code.spip.net/@debutElement
20 public function debutElement($phraseur, $name, $attrs) {
21 xml_debutElement($this, $name, $attrs);
24 // http://code.spip.net/@finElement
25 public function finElement($phraseur, $name) {
26 xml_finElement($this, $name);
29 // http://code.spip.net/@textElement
30 public function textElement($phraseur, $data) {
31 xml_textElement($this, $data);
34 public function piElement($phraseur, $target, $data) {
35 xml_PiElement($this, $target, $data);
38 // http://code.spip.net/@defautElement
39 public function defaultElement($phraseur, $data) {
40 xml_defaultElement($this, $data);
43 // http://code.spip.net/@phraserTout
44 public function phraserTout($phraseur, $data) {
45 xml_parsestring($this, $data);
50 public $err = array();
51 public $contenu = array();
52 public $ouvrant = array();
53 public $reperes = array();
60 // http://code.spip.net/@xml_indenter_dist
61 function xml_indenter_dist($page, $apply = false) {
62 $sax = charger_fonction('sax', 'xml');
63 $f = new IndenteurXML();
64 $sax($page, $apply, $f);
66 return $f->entete
. $f->res
;
68 spip_log("indentation impossible " . count($f->err
) . " erreurs de validation");
70 return $f->entete
. $f->page
;