Jump to:
| Project: | RDF Extensions |
| Version: | 7.x-2.x-dev |
| Component: | Evoc |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have drupal 7.8, rdf, rdfx, rfdx ui, and evoc.
Once in the past, using evoc, I imported vocabularies at a production site.
Now, I cannot remove all these unnecessary, for this site, vocabularies.
This resutls in a huge header, which becomes even more huge, because the markup repeats the header for each different kind of IE browser version (since it has difference class for each browser).
For example
<!--[if lt IE 7 ]> <html lang="en" dir="ltr" version="HTML+RDFa 1.1"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:og="http://ogp.me/ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:sioct="http://rdfs.org/sioc/types#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:schema="http://schema.org/" class="no-js ie6" <![endif]-->Don't ask why this happens, it just happens. I just mention to understand that I want to reduce the bloader header.
Moreover all these vocabularies have automatically made mappings with the existing fields of various content types, mappings that the system do not let me delete. Well, I delete them, I save, and they reappear (although the message above says that changes are saved).
This results in even more filling my markup with useless rdf.
Moreover I cannot clean up and just use a schema.org schema that I want, and I have a lot of rdf garbage that make the job of google rich snippet even more messy and producing errors like
Warning: RDFa tree has unknown type 'Item'.
UserAccount
Warning: RDFa tree has unknown type 'UserAccount'.I need to deliver clean markup.
I ended up like that, because this site is some months old, before even schema.org existed and I was experimenting back then with the newly rdfx/evoc module. I never imagined that the modules would not give option to remove those vocabularies and they automated mappings.
I need help to clean up the vocabularies and mappings, so to start from a clean point, where I will build just with schema.org module.
Thanks
Comments
#1
After uninstalling rdfx, schema.org etc and let only drupal core rdf module, the only table left is rdf_mapping.
There there is rdf mappings for each content type and taxonomy vocabulary.
mapping field is a BLOB and I don't know how to view it/edit it.
If I just delete all the records of rdf_module, would the site break, and never be able again to put rdf mappings in the future?
How can i reset mappings to default empty?
#2
This will revert all your mappings to defaults and remove additional namespaces:
- Uninstall evoc
- empty/TRUNCATE the tables rdf_mapping and rdfx_namespaces
- clear your caches (
admin/config/development/performanceor run drush cc all)if all you want is to support schema.org terms, you don't need to enable evoc or RDFx/RDF UI.
re the 'Warning: RDFa tree has unknown type' displayed on the rich snippet testing tool, it's not a bug in your markup, it's just Google warning you that some terms were not recognized (because Google only support a small subset of the terms defined on the Web). As long as you can see your type and the right properties in the output of the testing tool, you can ignore this warning.
yes, it's a missing feature, let's work on this at #1296820: Allow for imported vocabularies and namespaces removal.
#3
1. Since uninstalling rdf ui, evoc etc and let only rdf and schema.org, I have just one table at database, rdf_mappings, I didn't find any rdfx_namespaces.
2. I did your instructions. But there are still left some things which I cannot know why/how they are produced.
Why they are there and how I can remove them?
typeof="sioc:UserAccount" at each commenter name.
typeof="skos:Concept" property="rdfs:label skos:prefLabel" at each taxonomy term
typeof="sioc:Item foaf:Document" at article tag
3. I still have the following repeated 4 times for each browser since at html.tpl.php I have
print $html_tag_attrs;
[if lt IE 7 ]> <html lang="en" dir="ltr" version="HTML+RDFa 1.1"xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:og="http://ogp.me/ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:sioct="http://rdfs.org/sioc/types#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:schema="http://schema.org/" class="no-js ie6"
How I can remove them?
Are these standard behavior of core rdf module or they are heritage of the removed evoc/rdfx/rdf-ui/vocabulary importer?
Thanks
#4
All of the things that you list are because of the core RDF module. The rdf_mapping table is installed by core. The mappings you list in #2 are because of the bug that I pointed you to in one of the other threads. Most of the namespace mappings at the top of the document are defined in core. The only one that isn't is the schema.org namespace at the bottom of the list. This is defined in the Schema.org module.
If you do not want #2 and #3, your only option ATM is to turn off the core RDF module. The fix for #2 probably won't come for a while and I doubt #3 will change during the 7.x development cycle. Of course, this means that you wouldn't be publishing Schema.org terms in RDFa.
#5
these are standard from core. if you install D7 from scratch, you will get the same. why do you want to remove them? version="HTML+RDFa 1.1" tells me that you are using a non-core theme, but you would get something similar with Bartik for example.
#6
Thanks for your support.
1.Yes I use a custom theme.
2. I though that they would create problem to google.
For sites to appear with rich snippets, webmaster must email google (they have a specific form for that) and then google will decide if it will or not include rich snippets in search results for the particular site.
I thought that the cleaner the code the more possible it is to get included by google.
3. "HTML+RDFa 1.1": should it be replaced with something better?
4. @linclark : are you referring to http://drupal.org/node/1229974 ?
"The fix for #2 probably won't come for a while ".
Do you mean it's a matter of time because of your limited time, or it depends on something else?
As I understood it is only linclark and scor who are developing semantic-web modules.
How we can attract more developers, or persuade acquia to deal with this important matter? Semantic web is the most important evolution that happens in web after web itself and if Drupal can be pioneer then it can attract bigger usage share.
5. If it is core rdf module behavior, then I have to compromise. I thought that all the headers as described in #3, where results of the imported vocabularies.
My header markup is huge because my theme repeats the same for 5 times just to add a class depending on the IE version. This is because of some scripts that try to emulate html5 and css for older IE versions.
6. So the only other way to implement the results that I want, is to disable rdf modules and schema.org and create custom tpl.php for that content type, I suppose, right?
#7
no, I was just pointing out that you were probably using a contrib/custom theme, and that this theme was not the cause of the namespaces in your markup.
oh, I see how that can be frustrating then! you do not need to repeat these namespaces three times in your markup. Do you have a reason for putting the
<html>element inside these IE conditionals? I though these conditional were usually used for CSS and/or js.#8
I agree that this new phase of the Web is really just emerging and that Drupal is in a really good leadership position. Even folks in the W3C and WHATWG have commented on how future-foward Drupal is with these technologies.
I think that the best way to bring more volunteers on is to find very immediate and very simple uses for the technology and then to share them, either through screencasts and other documentation or through downloadable configurations. By spurring use of the technology to solve simple problems, it will increase the number of users playing with the technology, which will increase the understanding and the capacity for testing and development that we need.
#9
Yes, as already discussed here #1365654: RDFa 1.1 Lite in D8 core RDFa 1.1 will only be available in D8. ...but there's been an idea/suggestion of creating a contrib solution for D7 too that would work the same way that HTML5 Tools overrides D7 core HTML output in order to override drupal 7 RDF output. So, the RDFa project was born:
Still no code available, so if you want to be informed of the progress, follow here: #1459712: Initial release of RDFa? / Current status / What needs testing ...a.k.a. "Are we there yet?".
#10
Re: comment 7
Scor, the HTML element inside IE conditional comments sounds like the approach taken by the HTML5 Boilerplate. Perhaps dropbydrop's theme uses a similar approach. See Conditional stylesheets vs CSS hacks? Answer: Neither! for an explanation of how this works. It means that you get 5 html opening tags. Not pretty IMHO but a reasonably effective way to provide a browser class.
To use this approach in Drupal however, you need to put $rdf_namespaces> (D7) or $html_attributes (D8) inside all of the html tags (i.e. inside each conditional comment), so all the namespace declarations are duplicated as well. Around 80 lines of HTML source code before you even reach the head tag!
#11
exactly. This approach is based on html5 boilerplate