In all the hard work we've done to make sure the terms were properly annotated on node pages, we've missed the term pages themselves :( To fill that blank, and in line with what we already do for nodes and users, we should add the title of the term in a meta tag on top of the HTML document, including its RDF type.
It's great to see that the term description is displayed on the term page too (if it exists). However it seems it's not using a field and therefore does not expose the RDF mapping which is present in core as part of taxonomy_rdf_mapping()!
The good news is that by virtue of the fact that we have RDFa on terms displayed as part of the node teasers, we do have in fact the relation between the term and all the nodes being displayed. But that's assuming the terms are displayed in teaser mode. Site administrators could decide to remove them from the teaser and we would lose this relation. Let's see if there is an easy way to add it in the wrapper for each node.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 711848_term_rdfa_7.patch | 2.13 KB | scor |
| #5 | 711848_term_rdfa_5.patch | 2.13 KB | scor |
| #2 | rdf_termpage_711848_2.patch | 1.31 KB | linclark |
| #1 | rdf_termpage_711848_1.patch | 1021 bytes | linclark |
Comments
Comment #1
Anonymous (not verified) commentedThis patch takes care of :
See #712914: rdf_template_variable_wrapper does not work for unrendered template variables for a discussion of :
I will check on the wrapper for each node and add tests.
Comment #2
Anonymous (not verified) commentedThis patch includes the annotation for the term description.
It requires #712914: rdf_template_variable_wrapper does not work for unrendered template variables to work.
It would also require a solution #712920: rdf_template_variable_attributes_array doesn't allow you to set value for 'inline' in order to output valid XHTML.
Comment #3
Anonymous (not verified) commentedIn thinking about the wrapping the node issue, do we want to expose the tag even if it's not exposed in the HTML?
For instance, if taxonomy is used as an internal way of organizing content, a site administrator may set the tags to hidden on both the node and the teaser and not realize that the terms are still being exposed. Certainly an edge use case, but possibly one to consider.
Comment #5
scor commentedLet's focus on the most important aspect of this issue for now. This patch adds the term name and RDF type to each term page. Most importantly, it ensures that dereferencing a term URI in Drupal returns the same RDF data as what is stated elsewhere in Drupal: this is one of the main pillar of Linked Data. Yahoo! SearchMonkey for example will ignore statements about a resource if these are not present when looking up the resource itself.
Comment #6
Anonymous (not verified) commentedJust a small typo, 'RDFa markup found term page.' should be 'RDFa markup found on term page.' It is missing the on.
Otherwise looks good.
148 critical left. Go review some!
Comment #7
scor commentedtypo fixed!
Comment #8
Anonymous (not verified) commentedThis is ready to go. As scor said in #5, it adds the term name and RDF type to each term page so that the term URIs actually dereference.
Comment #9
dries commented#711848 by linclark, scor: added missing RDFa annotations on term pages.
I wonder if we're missing a check_plain here...
Comment #10
scor commentedDries: I also checked this out before posting the patch #7: all elements are processed by theme_html_tag which escapes the values via drupal_attributes().
Comment #11
scor commentedjust realizing this was committed at as part of http://drupal.org/cvs?commit=339496 - leaving this RTBC to check whether Dries meant to commit this or not.
Comment #12
dries commentedYep, meant to commit this.