Letractively / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

RDFa parser fails on typed literals when xml:lang is specified #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Prepare an XHTML+RDFa document in which there are both an element
producing a typed literal, and an xml:lang specification (e.g. on the root
html element). An example document is attached.
2. Feed this file to the RDFLib parser.

What is the expected output? What do you see instead?
The expected output is one triple in which the object is a typed literal,
as per "RDFa in XHTML: Syntax and Processing" section 6.3.1.2. Instead,
RDFLib reports "TypeError: A Literal can only have one of lang or datatype,
per http://www.w3.org/TR/rdf-concepts/#section-Graph-Literal"

What version of the product are you using? On what operating system?
I am using RDFLib trunk (r1843) on Debian GNU/Linux 5.0.

Please provide any additional information below.
The issue exists because the parser passes the current lang value to the
Literal() constructor even though the datatype is specified. The
constructor then complains.

Original issue reported on code.google.com by vfaronov on 9 Feb 2010 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eik...@gmail.com on 9 Feb 2010 at 9:23

GoogleCodeExporter commented 9 years ago
The attached patch fixes the issue for me without causing TC #108 to fail.

Original comment by vfaronov on 9 Feb 2010 at 9:32

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r1842. Thank you for reporting the issue and supplying the patch.

Original comment by eik...@gmail.com on 9 Feb 2010 at 9:46

GoogleCodeExporter commented 9 years ago
The next release is going to be the 3.0 release.

Original comment by eik...@gmail.com on 11 Feb 2010 at 6:07

GoogleCodeExporter commented 9 years ago
eikeon, this issue has already been fixed in r1845. It just wasn't marked as 
fixed
for some reason.

Original comment by vfaronov on 11 Feb 2010 at 6:23

GoogleCodeExporter commented 9 years ago
vfaronov, thank you. Marking as fixed now.

Original comment by eik...@gmail.com on 11 Feb 2010 at 6:26