Closed (fixed)
Project:
RDF Extensions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
5 Aug 2011 at 17:35 UTC
Updated:
4 Mar 2014 at 13:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
scor commentedThis patch assumes #1237078: Align rdfx_get_rdf_model() prototype with entity API naming convention.
Comment #2
bkudrle commentedPatch was applied successfully in the Quickstart environment and passed all of the RDF and RDFx simpletests. I plan on doing some tests with other modules as well.
Comment #3
scor commentedtagging
Comment #4
Anonymous (not verified) commentedUsing drupal_alter at this point will result in a further divergence between RDFa and other serializations of the same resource, and one which doesn't come from the differences in syntax itself.
I don't have an issue in particular with this, but it will rile the pedants.
Comment #5
scor commentedTrue. One the other hand, wouldn't it help to add to the RDF model the bits which are only present in RDFa? There might be cases though where some data does not make sense to appear in the HTML because it's too verbose or naturally doesn't appear in HTML (I agree it could be added with hidden metadata elements though). Danbri also made the argument that there is no rule, and that "there are all kinds of reasons why human-facing HTML pages vs feed-style RDF/XML links would be organized differently".
Let's try to find a compromise here. I think that at least anything that appears in RDFa should also appear in the RDF model (and thus any serialization + SPARQL Endpoint).
Comment #6
Anonymous (not verified) commentedDan Bri also says:
It should at least be very clearly documented that this shouldn't be used as a hack workaround and that people should register their predicates with the core Mapping API to the greatest degree possible.
Comment #7
scor commentedI agree, this needs to be documented. I'll take care of that.
Comment #8
scor commentedhere is an updated patch with a warning on diverging RDF data. Does that address your concerns, Lin?
Comment #9
Anonymous (not verified) commentedI don't believe it's strong enough, and it is difficult to parse.
I would say:
Comment #10
scor commentedThanks Lin, incorporated your suggestion. Also split the index attachment and CURIEs expansion so the drupal_alter() happens in between the two.
Comment #11
ashepherd commentedI'm wondering if the $id the drupal_alter() line was meant to refer to the entity id, the $wrapper->getIdentifier()
drupal_alter('rdf_model', $res, $type, $id);to
drupal_alter('rdf_model', $res, $type, $wrapper->getIdentifier());my apologies, I was working off of "7.x-2.0-alpha4"
Comment #11.0
ashepherd commentedfix typo
Comment #12
scor commentedNot sure I understand your question. yes, $id is the entity ID passed to the rdfx_get_rdf_model(). It might be the same as $wrapper->getIdentifier().
Comment #13
scor commentedI've been using this patch on a few projects and it's working well. I'm planning to commit this in 2 weeks.
Comment #14
scor commentedFixed with http://drupalcode.org/project/rdfx.git/commit/cc7d4fc