HTML and CSS Reference
In-Depth Information
Microdata and Microformats
As mentioned earlier, overlapping features can be described by both microdata and microformats, as well as arbitrary
features using RDFa. Microformats can also be used simultaneously with (X)HTML5 microdata. For example, hCard
can be written together with microdata, as shown in Listing 7-89.
Listing 7-89. Combining hCard with Microdata
<dl class="vcard" itemscope itemtype=" http://data-vocabulary.org/Person " >
<dt class="fn" itemprop="name"><a href="http://example.com"
itemprop="url">John Smith</a></dt>
<dd class="title" itemprop="title">Photographer</dd>
<dd class="adr" itemprop="address" itemscope
itemtype=" http://data-vocabulary.org/Address " ><span class="locality"
itemprop="locality">Memphis</span>, <abbr title="Tennessee" class="region"
itemprop="region">TN</abbr>
<span class="postal-code" itemprop="postal-code">38145</span></dd>
</dl>
Dublin Core and vCard in RDF
The flexibility of the Resource Description Framework makes it simple to use more than one kind of metadata from
external namespaces at the same time. Consequently, rich semantics can be added to documents from a variety of
vocabularies simultaneously (Listing 7-90).
Listing 7-90. Dublin Core and vCard in RDF
<?xml:namespace ns=" http://www.w3.org/RDF/RDF/ " prefix="RDF" ?>
<?xml:namespace ns=" http://purl.oclc.org/DC/ " prefix="DC" ?>
<?xml:namespace ns=" http://person.org/BusinessCard/ " prefix="CARD" ?>
<RDF:RDF>
<RDF:Description RDF:HREF="http://uri-of-Document-1">
<DC:Creator RDF:HREF="#Creator_001"/>
</RDF:Description>
<RDF:Description ID="Creator_001">
<CARD:Name>John Smith<CARD:Name>
<CARD:Email>jsmith@example.net<CARD:Email>
<CARD:Affiliation>ABC Ltd.<CARD:Affiliation>
</RDF:Description>
</RDF:RDF>
Dublin Core, vCard, and Math-Net
The introduction of a person on a brochure-style home page can be described in many ways. One of them is the
combination of Dublin Core and vCard. Indexing and processing such data can be enhanced by providing them in
RDF. Listing 7-91 shows an example.
 
Search WWH ::




Custom Search