This is a catch all issue for cleaning up rdf.module. Only code changes should go here. Many RDF namespaces were added as part of the initial RDF patch but some are not being used in core. Some RDF mappings might need to be aligned upon feedback from the semweb community.

- rename sioc:User to sioc:UserAccount
- remove unused namespaces

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Issue tags: +RDF

tagging

scor’s picture

sun’s picture

Priority: Minor » Critical

I can't help, but this sounds critical to me. What if my contributed module tries to implement one of the namespaces we are going to remove here?

If I'm mistaken, then please demote this issue to normal.

scor’s picture

Priority: Critical » Normal

that's not critical. if a contrib module needs a namespace, it can define it via hook_rdf_namespaces(). Even if it's defined twice, there will be not problem as long as the namespaces are the same (see #721082: Prevent conflicting namespaces and move hook_rdf_namespaces() invocation into rdf.module for more details on these cases).

JeremyFrench’s picture

Wouldn't having a large default set of namespaces make #721082: Prevent conflicting namespaces and move hook_rdf_namespaces() invocation into rdf.module less of a problem, even if core doesn't use them all?

scor’s picture

see also the comment on skos:Collection at http://groups.drupal.org/node/44094#comment-154828

scor’s picture

Status: Active » Needs review
FileSize
10.56 KB

@JeremyFrench: sure, though we can't possibly include all the existing namespaces out there, plus those which do not exist yet :) we should keep core as lightweight as possible and provide the right APIs for modules to extend it easily, in this case there is hook_rdf_namespaces().

Changes in the patch attached:
- rename sioc:User to sioc:UserAccount per announcement on the sioc mailing list.
- update the SKOS mappings of the vocabulary and term entity types to use skos:ConceptScheme and skos:inScheme (comment on gdo and discussion on the SKOS mailing list). use dc:title as vocabulary name mapping according to the example of the SKOS primer: 2.5 Concept Schemes.
- remove non used namespaces (making an exception for rdf, owl and rss given their foundational role in the Semantic Web).

sun’s picture

Status: Needs review » Needs work
+++ modules/rdf/rdf.module
@@ -549,7 +546,7 @@ function rdf_preprocess_user_profile(&$variables) {
-  // Adds the relationship between the sioc:User and the foaf:Person who holds
+  // Adds the relationship between the sioc:UserAccount and the foaf:Person who holds
   // the account.

Exceeds 80 chars.

116 critical left. Go review some!

scor’s picture

Status: Needs work » Needs review
FileSize
10.6 KB

if only sed would have told me that ;) - thanks sun.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Not sure whether there actually is anyone else who could do a technical (RDF) review. Our RDF maintainer did this patch, so I'm going to trust him.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Reviewed. Looks valid. Committed to CVS HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

scor’s picture

Status: Closed (fixed) » Active

reopening this issue to remove a few more namespace which are not used in core. They were left initially since there was a potential conflict of namespace definitions, but now it has been fixed with #721082: Prevent conflicting namespaces and move hook_rdf_namespaces() invocation into rdf.module, we can safely remove them and let modules declare them when needed. Non used namespaces are owl, rdf and rss.

scor’s picture

Status: Active » Needs review
FileSize
711 bytes

totally forgot about this small tweaking. here is the patch. no API change, no db update required.

Status: Needs review » Needs work

The last submitted patch, 712538_14_remove_old_ns.patch, failed testing.

scor’s picture

Status: Needs work » Needs review
FileSize
3.66 KB

some tests were arbitrarily using the owl namespace, let's use the rdfs namespace instead. This patch also updates the aligns of the RDF module documentation with the list of namespaces from rdf.module.

JeremyFrench’s picture

The patch looks good in itself.

However, is open graph used in core? I did a couple of greps but couldn't find it.

Personally I would rather see Open Graph in core, but that is probably a separate issue.

scor’s picture

we use OG in the standard install profile for annotating the image field, this was added in a separate issue, see patch #632484-44: Update the default profile with the proper RDF mapping.

JeremyFrench’s picture

Status: Needs review » Reviewed & tested by the community

In that case I have no issues with the patch at all.

Setting to Reviewed, it is a small patch so I think one pair of eyes is ok, but please set back if you are not comfortable.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -RDF

Automatically closed -- issue fixed for 2 weeks with no activity.