The exposed address fields should expose RDFa data, which leads to two questions:

  • Which RDFa mapping to use? The only common standard I could find is the vCard one, which is getting old (it goes all the way back to x520 and is very much US-centric) but can probably be mapped (with loss) to xAL
  • How to properly expose RDFa data and microformats at the same time? In #797608: hcard implementation we have a discussing about exposing hCard data. How to make the mapping consistent and easy to maintain?
CommentFileSizeAuthor
#2 Microdata_and_Microformats.JPG45.13 KBMac_Weber
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

subscribe. +1. We should have a solid implementation of address field for D7 with RDFa support.

Mac_Weber’s picture

Title: Rich Snippets integration » RDFa integration
FileSize
45.13 KB

List of available standards.

Google's support pages lists 3 standards:

  • Microdata (recommended by Goog)
  • Microformats
  • RDFa
  • HTML5 tag <address> - read notes about it

Which one to pick?

The HTML5 tag <address>. This tag must be used ONLY when the address belongs the author/owner of the content. It is not always the case. In addition this tag must not contain any nested address elements, which makes it not usable in addition to the other standards.

It seems HTML5 is going to use Microdata as you can see at: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.ht... (updated yesterday)

However, nothing stop us using both Microdata and Microformats, as this code I found in this page:

Green: Microdata
Yellow: Microformat hCard
Microdata and Microformat

Mac_Weber’s picture

Title: RDFa integration » Rich Snippets integration

Changing title

johnv’s picture

Issue summary: View changes
Related issues: +#797608: hcard implementation

Attached issue contains an (outdated) patch.

scor’s picture

https://drupal.org/project/schemaorg now supports RDFa and schema.org via the schemaorg_contrib module, see more information on the schema.org project page.

I think this issue can be closed. Please reopen if you disagree.

Maybe the maintainers of the addressfield module would like to add a note on the project page to point to the schema.org for RDFa support?

johnv’s picture

Title: RDFa integration » Address field & RDFa integration
Mac_Weber’s picture

Title: Address field & RDFa integration » Rich Snippets integration
Status: Fixed » Active

I don't think this issue should be closed because the module Address Field should give the snippets by itself, not depending on other modules. This is what is proposed on the module's description. Moreover, in many cases having a module just for this small task may be an overkill. Of course, it may be interesting in other use cases.

The title should be switched back too, as we can support 2 different snippets at once. Read comment #2.

rszrama’s picture

I'm not opposed to recommending the other module. How likely is it that someone will want to enrich their Address Field output and not take advantage of additional schema.org related enrichments? I'd much rather leave it up to scor to maintain than add that to our plate in this module. : )

dalin’s picture

Additionally if you just want to use an <address> element, then you can use Fences module
https://www.drupal.org/project/fences

bojanz’s picture

Status: Active » Fixed

http://stackoverflow.com/questions/26188003/markup-for-postal-addresses has the relevant answer

Basically, the address element should never be used. When it comes to semantic markup, the two main options are Schema.org and microformats.
Since there's no one-true-way of doing this, I'm happy to leave it to other modules, like #5 and #7 suggested.

I'll add a note to the project page for https://www.drupal.org/project/schemaorg

Anonymous’s picture

With the patch at https://www.drupal.org/node/1259582#comment-9893027 , Addressfield will support the Microformats module for adding microformats to the address field.

Status: Fixed » Closed (fixed)

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