Source for file checkxml.php
Documentation is available at checkxml.php
* Fichier proposant des fonctions pour valider le XML Lodel
* LODEL - Logiciel d'Edition ELectronique.
* Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos
* Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot
* Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou
* Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
* Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
* Copyright (c) 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot
* Home page: http://www.lodel.org
* E-Mail: lodel@lodel.org
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* @author Ghislain Picard
* @copyright 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
* @copyright 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
* @copyright 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot
* @licence http://www.gnu.org/copyleft/gpl.html
* Vérifie le contenu d'un fichier.
* Cette méthode récupère le contenu d'un fichier et appelle la méthode checkstring
* @param string $filename le nom du fichier
* @param integer $error (n'est pas utilisé dans la fonction) par défaut à 0
* @return un booleen indiquant si le XML est valide ou non.
* Vérifie le XML d'une chaine de caractère
* @param string &$text la chaine de caractère
* @param integer $error (n'est pas utilisé dans la fonction) par défaut à 0
* @return un booleen indiquant si le XML est valide ou non.
echo '<h1>ERROR</h1><p>Le fichier produit n\'est pas XML. Veuillez svp poster un rapport de bug sur <a href="http://sourceforge.net/projects/lodel/">http://sourceforge.net/projects/lodel<a/>. Pensez à joindre le fichier.<br />En attendant que le problème soit résolu, essayez de changer le stylage de votre fichier.</p><p><hr /></p>';
require $GLOBALS[home]. "xmlfunc.php";
echo "L'erreur se situe avant la zone rouge. Elle peut etre due a une erreur bien au dessus la ligne donne par le parser<br />";
echo preg_replace("/\n/se", "'<br /><b>'.((\$GLOBALS[line]++)+2).'</b> '", $data);
foreach ($attrs as $att => $val) {
$balise .= " $att=\"$val\"";
echo "<font color=blue></$name></font>";
|