Metadata Service: Doc type, required field, and RDFa date format Velocity snippets

These snippets are useful when working with the Percussion Metadata service.

The Metadata service can parse content with the following document type and html tags:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "">
<html xmlns="" xmlns:rdf="" xmlns:dcterms="" xmlns:perc="" lang="en" xml:lang="en">

Date properties need to be in the following format to be parsed correctly:

#set($rdf_date_format = "yyyy-MM-dd'T'HH:mm:ss")##
<meta property="dcterms:created" content="$${rdf_date_format}, $sys.item.getProperty('rx:yourdatefield').Date)" name="DCTERMS.created" /> 

The dcterms:alternative property is required for content to be indexed. The title field is a good candidate for this:

<title property="dcterms:alternative">#displayfield('displaytitle')</title>