Ciao a tutti, non riesco proprio a fare una trasformazione xslt..
ottengo sempre lo stesso errore:
Sablotron error on line 1: XML parser error 9: junk after document element in /home/offerte_xml.php on line 67
XSLT processing error: XML parser error 9: junk after document element
MA DOVE SBAGIO??? !!
![]()
ecco il codice:
<? session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="css/stili.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>OFFERTE</title>
</head>
<body>
<?
$ua= $_SERVER['HTTP_USER_AGENT'];
include("database/classe_database.php");
include("funzioni_php/funzioni.php");
if(!area_riservata())
..niente di rilevante..
}
for($i=0;$i<$num_offerte;$i++){
$xml=$xml."<offerta>";
$xml=$xml."<proprietario>";
$xml=$xml.$tavola['propietario'];
$xml=$xml."</proprietario>";
$xml=$xml."<acquirente>";
$xml=$xml.$offerta['acquirente'];
$xml=$xml."</acquirente>";
$xml=$xml."<prezzo>";
$xml=$xml.$tavola['prezzo'];
$xml=$xml."</prezzo>";
$xml=$xml."</offerta>";
}
if(eregi( "msie", $ua)) {
$xsl=join('',file("offerte.xsl"));
} else{
$xsl = implode('', file('offerte.xsl'));
}
$arguments = array(
'/_xml' => $xml,
'/_xsl' => $xsl
);
$xsltproc = xslt_create();
$html = xslt_process($xsltproc, 'arg:/_xml','arg:/_xsl', NULL, $arguments);
if (!$html) die('XSLT processing error: '.xslt_error($xsltproc));
xslt_free($xsltproc);
echo $html;
}
?>
</body>
</html>
ed ecco il file xslt associato (praticamente nullo)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>
Grazie a tutti

Rispondi quotando