[foaf-dev] parser error with bio: schema - uneven XML in rdfs:comment

Ian Davis me at iandavis.com
Thu Jun 9 00:07:29 CEST 2011

Hi Dan,

On Wed, Jun 8, 2011 at 8:37 PM, Dan Brickley <danbri at danbri.org> wrote:
> Hey Ian,
> Parsing the bio: schema with the RDF::Trine Perl parser (see
> http://pastebin.com/raw.php?i=WZxpxHiR) , I run into an error:
>  http://chatlogs.planetrdf.com/swig/2011-06-08#T19-31-36
> 21:26 danbri: kasei, it seems parser doesn't like the bio: schema,
> even if rapper does
> 21:26 danbri: 'Cannot canonicalize XMLLiteral: :2: parser error :
> Extra content at the end of the document '
> 21:28 danbri: ah, the fragment is illformed
> 21:28 danbri: $VAR1 = '<p>Based on information at <a
> href="http://en.wikipedia.org/wiki/Henry_VIII_of_England">Wikipedia</a>
> and <a href="http://www3.dcs.hull.ac.uk/cgi-bin/gedlkup/n=royal?royal00828">Hull
> University</a></p>
> 21:28 danbri: <pre>
> 21:28 danbri: interesting
> ... it seems the parser doesn't like the XML - presumably not being a
> complete document. I tried tweaking it but just managed to generate
> more errors (which suggest the entity-escaping is being undone and the
> < and > causing trouble - Greg, could you take a look?).

I think I could fix this by wrapping all of that content with a
<div></div> giving it a single root element. What do you think?

> Either way it seems a good thing having examples in the schema, so I
> thought I'd pass this along rather than suffer in silence. And nice to
> have pure Perl RDF tools that do SPARQL btw :)

I agree! Though I'm afraid I left Perl behind a long time ago after an
extended romance with it. I'm dating Python these days :)

> cheers,
> Dan

More information about the foaf-dev mailing list