ruby-rdf / rdf-rdfa

Ruby RDFa reader/writer for RDF.rb.
http://ruby-rdf.github.com/rdf-rdfa
The Unlicense
35 stars 11 forks source link

Creating a typed literal with a language in scope adds the language to the typed literal #11

Closed gkellogg closed 11 years ago

gkellogg commented 11 years ago

As reported on public-rdfa-wg:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" prefix="dct: http://purl.org/dc/terms/ xsd: http://www.w3.org/2001/XMLSchema# s: http://schema.org/">
 <head>
  <title>Test Case</title>
 </head>
 <body about="http://example.org/foo">
  <p property="dct:date" datatype="xsd:string" content="2010-11-12">2010</p>
 </body>
</html>

Produces the following:

@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://example.org/foo> dct:date "2010-11-12"^^xsd:string .

Which is illegal. The root problem is that RDF::Literal is not catching this. However, RDFa should not be attempting to create it in the first place.

gkellogg commented 11 years ago

Released in 1.0.2