|
From: Richard C. <ri...@cy...> - 2007-10-08 16:49:02
|
Daniel, On 8 Oct 2007, at 18:31, Daniel Lewis wrote: > Here is an RDF file which I know it doesn't work for, its a FOAF > profile: > http://www.vanirsystems.co.uk/foaf.rdf Works for me. Below is a test script that parses the file and prints it again to RDF/XML. I run this with RAP 0.9.5 and it works fine. Are you sure that this is the URI on which your script shows the error? Maybe you should try to isolate a minimal PHP script that triggers the error and that we can run without changes. Best, Richard ------- begin test script --------- <?php define("RDFAPI_INCLUDE_DIR", "rdfapi-php-0.9.5/api/"); include(RDFAPI_INCLUDE_DIR . "RdfAPI.php"); $model = ModelFactory::getDefaultModel(); $model->load("http://www.vanirsystems.co.uk/foaf.rdf"); echo $model->writeRdfToString(); ------- end test script -------- > > and here is a snippet: > public function connectToFoaf($uri) { > $this->model = ModelFactory::getDefaultModel(); > $this->model->load($uri); > } > ... > ... > $result = $this->model->findFirstMatchingStatement($statement- > >getObject(), > $name, NULL); > $nameResult = $this->makeSane($result); > > > Thats the best I can do for code snippets, the error is: > > Warning: RDFAPI error (class: parser): only one element allowed inside > a property element. in > /home/daniel/public_html/xippr/code/lib/vendor/rdfapi-php/api/ > syntax/RdfParser.php > on line 1045 > > Fatal error: RDFAPI error (class: parser; method: generateModel): > XML-parser-error 76 in Line 89 of input document. in > /home/daniel/public_html/xippr/code/lib/vendor/rdfapi-php/api/ > syntax/RdfParser.php > on line 2225 > > Many thanks, > > Daniel > |