-
Notifications
You must be signed in to change notification settings - Fork 10
Turn off the rdf List generation? #3
Comments
Well... the generation 'simply' implements what is in the transformation note: http://www.w3.org/TR/microdata-rdf/ There is value for controlling this: http://www.w3.org/TR/microdata-rdf/#value-ordering The registry for schema.org looks as follows: "http://schema.org/": { This can of course be changed/updated, but you tell us what and how... That being said, isn't it correct that if this is serialized in Turtle, it would Ivan danbri wrote:
Ivan Herman |
I tried cutting this down, in my checked out version, _registry = """ ...but I'm still getting some firsts and rests: danbri-macbookpro:ogp danbri$ ./sdo2ogp.py -n tv1.html |
Ack. I will try to find some time to look at it; there may be a bug... Ivan danbri wrote:
Ivan Herman |
Well, I looked at this and, unfortunately, this is correct (again, the structure is <> md:item ( item1 item2 item2 ) This is because the microdata specification is adamant on keeping the order of :-( Gregg, I wonder whether we should not issue a new version of the note with an Ivan danbri wrote:
|
Can you suggest a hack that will make this parser emit non-List-based triples from schema.org microdata? |
Well... honestly, I do not see anything clean. Of course, it can be removed from Speaking as an individual, and knowing the usage of microdata, I think the fact Ivan Gunnar wrote:
|
On 20 February 2014 07:49, Ivan Herman [email protected] wrote:
I'm not aware of anyone relying on document order for schema.org semantics. That said, it is perfectly proper for a doc format like HTML+Microdata to |
Per w3c/microdata-rdf#6, the second edition of the Microtdata to RDF transform specification (https://www.w3.org/TR/microdata-rdf/) suggests that the top-level md:item should be dropped. It would be great to see the pyMicrodata parser plugin for rdflib follow that recommendation; right now I'm crawling a bunch of html and extracting RDFa, JSON-LD, and microdata into a triple store, and the md:item misdirection is a pain. |
@dbs, I have made the changes and issues a PR for this: however, this PR has never been incorporated. It seems that there were problems with the procedures to accept the PR; to be honest, I do not remember all the details. The automatic system, I believe, reported some errors that, in my view, aren't errors and we got stuck. Very honestly, I have not looked at this thing since then (more than a year) and the facts are hazy. If somebody can de-block this situation, that would be good but, really, I cannot do it these days (I pretty much moved away from RDFLib...) /Cc: @joernhees |
heh, that's still on my todo list as well and then life happened... :-/ let's keep the discussion in RDFLib/rdflib#443 and close this when RDFLib/rdflib#443 is resolved |
Thanks for the update, @iherman -- I'll try to put some more effort into resolving RDFLib/rdflib#443 as well! |
I appreciate that! Thanks. Ivan |
Is there a way to turn off the list generation?
e.g. the example from http://schema.org/TVSeason
... is there a way to avoid all the first/rest stuff?
_:Nc1fdd703612347a68ecb956d14e81542 http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:Nb3c884b3ffea425e976818d348c61a6c .
_:N606548c887634be18ea22276a125b2dd http://schema.org/name "Jessica Capshaw" .
_:N84fa0e455314402bbe92e9c24e2fff1e http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/Person .
_:Nb3c884b3ffea425e976818d348c61a6c http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/TVSeason .
_:N84fa0e455314402bbe92e9c24e2fff1e http://schema.org/name "Shonda Rimes" .
_:N383b433e7e7d4f33af5558a8a0332e87 http://schema.org/datePublished "2006-05-14" .
_:Nb3c884b3ffea425e976818d348c61a6c http://schema.org/numberOfEpisodes "14" .
_:N606548c887634be18ea22276a125b2dd http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/Person .
_:N1bda1e22f4974a6c9b0a8a14c5d827e1 http://schema.org/name "Greys Anatomy" .
_:N51a6d0e636f34cc1be79c8dea67e046f http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/Person .
_:Nfbdefb1d62944d24a4259265ca8fef3e http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/TVEpisode .
_:N666ff0980cb14865beb1312ad601600b http://www.w3.org/1999/02/22-rdf-syntax-ns#rest http://www.w3.org/1999/02/22-rdf-syntax-ns#nil .
_:Nb3c884b3ffea425e976818d348c61a6c http://schema.org/name "Season 1" .
_:Nc1fdd703612347a68ecb956d14e81542 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest _:N509763638b694c4191fa4b7b2665c631 .
_:N1bda1e22f4974a6c9b0a8a14c5d827e1 http://schema.org/actor _:N2d3e495c0b524e2bbda79dd00c19db8b .
_:N509763638b694c4191fa4b7b2665c631 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest http://www.w3.org/1999/02/22-rdf-syntax-ns#nil .
_:N1bda1e22f4974a6c9b0a8a14c5d827e1 http://schema.org/season _:Nc1fdd703612347a68ecb956d14e81542 .
_:N32d2c32dcbb9444da07bcae1b1179073 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest http://www.w3.org/1999/02/22-rdf-syntax-ns#nil .
_:N32d2c32dcbb9444da07bcae1b1179073 http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:Nfbdefb1d62944d24a4259265ca8fef3e .
_:N07a7522d6b274b01ad178b2c660c3dc4 http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:N606548c887634be18ea22276a125b2dd .
_:N51a6d0e636f34cc1be79c8dea67e046f http://schema.org/name "Justin Chambers" .
_:N1bda1e22f4974a6c9b0a8a14c5d827e1 http://schema.org/author _:N84fa0e455314402bbe92e9c24e2fff1e .
_:N383b433e7e7d4f33af5558a8a0332e87 http://schema.org/numberOfEpisodes "27" .
_:N383b433e7e7d4f33af5558a8a0332e87 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/TVSeason .
_:Nfbdefb1d62944d24a4259265ca8fef3e http://schema.org/name "Episode 1" .
_:N666ff0980cb14865beb1312ad601600b http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:N1bda1e22f4974a6c9b0a8a14c5d827e1 .
_:N383b433e7e7d4f33af5558a8a0332e87 http://schema.org/name "Season 2" .
file:tv1.html http://www.w3.org/ns/rdfa#usesVocabulary http://schema.org/ .
_:N509763638b694c4191fa4b7b2665c631 http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:N383b433e7e7d4f33af5558a8a0332e87 .
_:N383b433e7e7d4f33af5558a8a0332e87 http://schema.org/episode _:N32d2c32dcbb9444da07bcae1b1179073 .
file:tv1.html http://www.w3.org/ns/md#item _:N666ff0980cb14865beb1312ad601600b .
_:N2d3e495c0b524e2bbda79dd00c19db8b http://www.w3.org/1999/02/22-rdf-syntax-ns#rest _:N07a7522d6b274b01ad178b2c660c3dc4 .
_:Nfbdefb1d62944d24a4259265ca8fef3e http://schema.org/episodeNumber "1" .
_:Nb3c884b3ffea425e976818d348c61a6c http://schema.org/datePublished "2005-05-22" .
_:N1bda1e22f4974a6c9b0a8a14c5d827e1 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://schema.org/TVSeries .
_:N07a7522d6b274b01ad178b2c660c3dc4 http://www.w3.org/1999/02/22-rdf-syntax-ns#rest http://www.w3.org/1999/02/22-rdf-syntax-ns#nil .
_:N2d3e495c0b524e2bbda79dd00c19db8b http://www.w3.org/1999/02/22-rdf-syntax-ns#first _:N51a6d0e636f34cc1be79c8dea67e046f .
The text was updated successfully, but these errors were encountered: