This is a follow up on #1259582: Support microdata in addressfield in Addressfield module where a default set of mappings for the compound addressfield field was proposed. I suggest to see if we could generalize some of the great work you've done so far (including DX!) in the microdata module, so that module interested in RDF can take advantage of this.

I can think of two aspects of microdata API which are good candidates (there may be more):
1. The definition of mappings for compound fields (related RDFx issue: #1199472: Extend core RDF mappings to support compound fields)
2. the definition of the compound fields default mappings

As Lin pointed out, they require changes in the field formatters in contrib, so to avoid asking contrib maintainers to make changes too often (and also negatively impact DX as a result of API changes), it would help if this API was usable by not only microdata but any module interested in RDF.

This would also prevent code duplication in contrib, where there is a risk of having both microdata mappings and RDF mappings.

Am I missing something else?

Comments

scor’s picture

I like the new features of this module. These are good candidates for being generalized:
#1349848: Autocomplete itemtypes from enabled vocabularies
#1349816: Enable modules to register and import vocabularies from external sources

I'm thinking that a structured data mapping UI would be useful for the greater good, not only for microdata, but for all other structured data syntaxes as well. It could either be the RDFUI module, or a new rdf_mapper project (I think RDF as the common denominator here between all these syntaxes, in fact, all vocabularies including schema.org are available as RDF). This module would also take care of the vocabularies management. Syntax modules could then use the rdf_mapper module API to pick the mapping info they need to insert the attributes in HTML or generate other syntaxes. Lin, what do you think?

scor’s picture

Structured data syntaxes include microdata, RDFa, RDF/XML, NTriples, Turtle. One could even build a microformats-2 plugin.

Anonymous’s picture

Module + patches welcome.

I would support this if someone dedicates the time to making sure that such a module:

  • actually works and reaches a stable release
  • can be used with limited modifications to existing code in modules I maintain
  • is easy for end users so that I'm not stuck answering confused support requests

However, I cannot be that 'someone' who's time is dedicated to this.

Anonymous’s picture

Also, here is the issue I posted in the Schema.org queue in June suggesting this approach #1185982: generalize this approach to other vocabs?

scor’s picture

absolutely, I didn't want to put all the work load on you. I would be happy to put some effort in this module, but before I start, I just wanted to have your support :) - btw, I will probably reuse some of your code + research, but I guess you are fine with that...

re #4, yep, same idea there...

Anonymous’s picture

Yes, I'm fine with such a module reusing code. Just make sure to be clear on the project page that microdata's built-in vocabulary import tools should be used until stated otherwise (which would be until there is an upgrade path from current implementation).

Also, I would suggest not using RDF in the module name if you intend it to be used by microdata module. I don't want to get into a discussion about whether microdata is an RDF syntax or not, but there are people (like one of the editors of the RDF 1.1 Concepts and Abstract Syntax draft) who say it isn't, and I don't want to add more confusion for end users.

scor’s picture

ok.

For now I'll just use the rdfx issue queue and see how it goes. then we can decide whether it needs to be its own project or not. In any case, I think "Structured Data Mapper" sounds cool :)

Anonymous’s picture

Status: Active » Closed (works as designed)

Since these would be requests for features in other modules, all of these will be handled as issues in RDFx or other modules.