<?php
require_once ("classes/note_rdf_generator.php");
include ("../config.php");
# neue Instanz des RDF Generators
$rdf = new RDFGenerator;
# XML Version setzen
$rdf->setVersion('1.0');
# XML Encoding setzen
#$rdf->setEncoding('UTf-8');
# XML Namespaces setzen
$rdf->setNamespaces(array(
'RDF' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
'XML' => 'http://purl.org/rss/1.0/',
'DC' => 'http://purl.org/dc/elements/1.1/'
));
$rdf->createChannel(array(
'title' => $CFGglobal['title'],
'link' => $CFGglobal['domain'].'/'.$CFGglobal['root'].'/',
'description' => $CFGglobal['descr'],
'dc' => array(
'publisher' => $CFGauthor['name'],
'language' => $CFGglobal['lang'],
'rights' => $CFGglobal['copyright']
)
));
require_once ("classes/note_xml_parser.php");
$xml = new XMLParser;
$items = $xml->getXMLData('../entries.xml');
for ($i = 0; $i < count($items['ENTRY']); $i++)
{
$rdf->addItem($items['ENTRY'][$i]);
}
echo '<title>Review RDF</title>';
echo '<h1>Review RDF</h1>';
echo '<p>Back to <a href="../enter.php">entries.app</a>.</p>';
echo '<textarea rows="30" cols="120">';
$rdf->printRDF();
echo '</textarea>';
$rdf->writeRDF('../../index.rdf');
?>