mod-meta.html 29.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>XHTML 2.0 - XHTML Metainformation Module</title>
<link rel="start" type="text/html" href="Overview.html" />
<link rel="contents" type="text/html" href="Overview.html#toc" />
<link rel="prev" type="text/html" href="mod-mediaAttribute.html" />
<link rel="next" type="text/html" href="mod-metaAttributes.html" />
<link rel="stylesheet" type="text/css" href="xhtml.css" />
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-WD.css" />
</head>
<body>
<div class="navbar">[<a accesskey="P" href="mod-mediaAttribute.html">previous</a>] &#160; [<a accesskey="N" href="mod-metaAttributes.html">next</a>] &#160;[<a accesskey="T" href=
"Overview.html#toc">table of contents</a>] &#160;[<a accesskey="E" href="elements.html">elements</a>] &#160;[<a accesskey="A" href="attributes.html">attributes</a>] 

<hr />
</div>

<h1><a id="s_metamodule" name="s_metamodule">23.</a> XHTML Metainformation Module</h1>

<div class='subtoc'>
<p><strong>Contents</strong></p>

<ul class='toc'>
<li class='tocline'>23.1. <a href="#sec_23.1." class="tocxref">The link element</a> 

<ul class="toc">
<li class='tocline'>23.1.1. <a href="#sec_23.1.1." class="tocxref">Forward and reverse links</a></li>

<li class='tocline'>23.1.2. <a href="#sec_23.1.2." class="tocxref">Links and search engines</a></li>
</ul>
</li>

<li class='tocline'>23.2. <a href="#sec_23.2." class="tocxref">The meta element</a> 

<ul class="toc">
<li class='tocline'>23.2.1. <a href="#sec_23.2.1." class="tocxref">meta and search engines</a></li>
</ul>
</li>

<li class='tocline'>23.3. <a href="#sec_23.3." class="tocxref">Literals and Resources</a></li>

<li class='tocline'>23.4. <a href="#sec_23.4." class="tocxref">Document Properties</a> 

<ul class="toc">
<li class='tocline'>23.4.1. <a href="#sec_23.4.1." class="tocxref">Literals</a></li>

<li class='tocline'>23.4.2. <a href="#sec_23.4.2." class="tocxref">Resources</a></li>

<li class='tocline'>23.4.3. <a href="#sec_23.4.3." class="tocxref">Making Use of External Lists of Properties</a></li>
</ul>
</li>

<li class='tocline'>23.5. <a href="#sec_23.5." class="tocxref">Properties of Other Resources</a> 

<ul class="toc">
<li class='tocline'>23.5.1. <a href="#sec_23.5.1." class="tocxref">Resources Within the Containing Document</a></li>

<li class='tocline'>23.5.2. <a href="#sec_23.5.2." class="tocxref">External Resources</a></li>
</ul>
</li>

<li class='tocline'>23.6. <a href="#sec_23.6." class="tocxref">Chaining Metadata</a></li>

<li class='tocline'>23.7. <a href="#sec_23.7." class="tocxref">Issues</a></li>
</ul>
</div>

<p>This section is <em>normative</em>.</p>

<p>The Metainformation Module defines elements that allow the definition of relationships. These may relate to:</p>

<ul>
<li>the document itself,</li>

<li>items external to the document, or</li>

<li>other items of metadata within the document.</li>
</ul>

<p>Note that this module is dependent upon the <a href="mod-metaAttributes.html#s_metaAttributesmodule">Metainformation Attributes</a> module. The attributes defined therein are available on the
elements defined in this module, and their semantics are the essential part of how these elements behave.</p>

<p>Elements and attributes in this module are:</p>

<table class="moduledef" border="1" summary="Elements and Attributes for Metainformation Module">
<thead>
<tr>
<th>Elements</th>
<th>Attributes</th>
<th>Content Model</th>
</tr>
</thead>

<tbody>
<tr>
<td>link</td>
<td><a class="csref" href="mod-attribute-collections.html#col_Common">Common</a></td>
<td class="content">( link | meta )*</td>
</tr>

<tr>
<td>meta</td>
<td><a class="csref" href="mod-attribute-collections.html#col_Common">Common</a></td>
<td class="content">( PCDATA | <a class="csref" href="mod-text.html#cs_Text">Text</a> )*</td>
</tr>
</tbody>
</table>

<p>Implementation: <a href="relax_module_defs.html#a_rmodule_Metainformation">RELAX NG</a></p>

<!-- INCLUDING ELEMENT modules/meta/link.mhtml -->
<h2><a id="sec_23.1." name="sec_23.1.">23.1.</a> The <a class="edef" id="edef_meta_link">link</a> element</h2>

<div class="aref-list">
<p><em>Attributes</em></p>

<!-- INCLUDING ATTRIBUTE modules/attributes/Common.mhtml -->
<dl class='attrDef'>
<dt>The <a class="csref" href="mod-attribute-collections.html#col_Common">Common</a> collection</dt>

<dd>A collection of other attribute collections, including: <a class="csref" href="mod-bidi.html#col_Bi-directional">Bi-directional</a>, <a class="csref" href="mod-core.html#col_Core">Core</a>, <a
class="csref" href="mod-edit.html#col_Edit">Edit</a>, <a class="csref" href="mod-embedding.html#col_Embedding">Embedding</a>, <a class="csref" href="mod-xml-events.html#col_Events">Events</a>, <a
class="csref" href="mod-xforms.html#col_Forms">Forms</a>, <a class="csref" href="mod-hyperAttributes.html#col_Hypertext">Hypertext</a>, <a class="csref" href="mod-i18n.html#col_I18N">I18N</a>, <a
class="csref" href="mod-csImgMap.html#col_Map">Map</a>, and <a class="csref" href="mod-metaAttributes.html#col_Metainformation">Metainformation</a>.</dd>
</dl>

<!-- END OF ATTRIBUTE FILE modules/attributes/Common.mhtml --></div>

<p>This element defines a link. <a class="eref" href="mod-meta.html#edef_meta_link">Link</a> conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a
tool-bar with a drop-down menu of links). <span class="should">User agents should enable activation of links and the retrieval of link targets. Since <a class="eref" href=
"mod-meta.html#edef_meta_link">link</a> elements may have no content, information from the <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">rel</a> and <a class="aref" href= 
"mod-core.html#adef_core_title">title</a> attributes should be used when labelling links.</span></p>

<div class="example">
<p>This example illustrates how several <a class="eref" href="mod-meta.html#edef_meta_link">link</a> definitions may appear in the <a class="eref" href="mod-document.html#edef_document_head">head</a>
section of a document. The current document is "Chapter2.html". The <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">rel</a> attribute specifies the relationship of the linked
document with the current document. The values "Index", "Next", and "Prev" are explained in the section on the attribute <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">
rel</a>.</p>

<pre class="example">
&lt;head&gt;
  &lt;title&gt;Chapter 2&lt;/title&gt;
  &lt;link rel="index" href="../index.html"/&gt;
  &lt;link rel="next"  href="Chapter3.html"/&gt;
  &lt;link rel="prev"  href="Chapter1.html"/&gt;
&lt;/head&gt;
</pre>
</div>

<h3><a id="sec_23.1.1." name="sec_23.1.1.">23.1.1.</a> Forward and reverse links</h3>

<p>While the <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">rel</a> attribute specifies a relationship <em>from</em> this document <em>to</em> another resource, the <a class= 
"aref" href="mod-metaAttributes.html#adef_metaAttributes_rev">rev</a> attribute specifies the reverse relationship.</p>

<p>Consider two documents A and B.</p>

<pre>
Document A:       &lt;link href="docB" rel="index"/&gt;
</pre>

<p>Has exactly the same meaning as:</p>

<pre>
Document B:       &lt;link href="docA" rev="index"/&gt;
</pre>

<p>namely that document B is the index for document A.</p>

<p>Both the <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">rel</a> and <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rev">rev</a> attributes may be
specified simultaneously.</p>

<h3><a id="sec_23.1.2." name="sec_23.1.2.">23.1.2.</a> Links and search engines</h3>

<p>Authors may use the <a class="eref" href="mod-meta.html#edef_meta_link">link</a> element to provide a variety of information to search engines, including:</p>

<ul>
<li>Links to alternate versions of a document, written in another human language.</li>

<li>Links to alternate versions of a document, designed for different media, for instance a version especially suited for printing.</li>

<li>Links to the starting page of a collection of documents.</li>
</ul>

<p>The examples below illustrate how language information, media types, and link types may be combined to improve document handling by search engines.</p>

<div class="example">
<p>The following example shows how to use the <a class="aref" href="mod-hyperAttributes.html#adef_hyperAttributes_hreflang">hreflang</a> attribute to indicate to a search engine where to find other
language versions of a document. Note that for the sake of the example the <a class="aref" href="mod-i18n.html#adef_i18n_xml:lang">xml:lang</a> attribute has been used to indicate that the value of
the <a class="aref" href="mod-core.html#adef_core_title">title</a> attribute for the <a class="eref" href="mod-meta.html#edef_meta_link">link</a> element designating the French manual is in
French.</p>

<pre class="example">
&lt;html ... xml:lang="en"&gt;
&lt;head&gt; 
&lt;title&gt;The manual in English&lt;/title&gt;
&lt;link title="The manual in Dutch"
      rel="alternate"
      hreflang="nl" 
      href="http://example.com/manual/dutch.html"/&gt;
&lt;link title="La documentation en Fran&#231;ais"
      rel="alternate"
      hreflang="fr" xml:lang="fr"
      href="http://example.com/manual/french.html"/&gt;
&lt;/head&gt;
</pre>
</div>

<div class="example">
<p>In the following example, we tell search engines where to find the printed version of a manual.</p>

<pre class="example">
&lt;head&gt;
&lt;title&gt;Reference manual&lt;/title&gt;
&lt;link media="print" 
      title="The manual in PostScript"
      hreftype="application/postscript"
      rel="alternate"
      href="http://example.com/manual/postscript.ps"/&gt;
&lt;/head&gt;
</pre>
</div>

<div class="example">
<p>In the following example, we tell search engines where to find the front page of a collection of documents.</p>

<pre class="example">
&lt;head&gt;
&lt;title&gt;Reference manual -- Chapter 5&lt;/title&gt;
&lt;link rel="start" title="The first chapter of the manual"
      hreftype="application/xhtml+xml"
      href="http://example.com/manual/start.html"/&gt;
&lt;/head&gt;
</pre>
</div>

<!-- END OF ELEMENT FILE modules/meta/link.mhtml --><!-- INCLUDING ELEMENT modules/meta/meta.mhtml -->
<h2><a id="sec_23.2." name="sec_23.2.">23.2.</a> The <a class="edef" id="edef_meta_meta">meta</a> element</h2>

<div class="adef-list">
<p><em>Attributes</em></p>

<!-- INCLUDING ATTRIBUTE modules/attributes/Common.mhtml -->
<dl class='attrRef'>
<dt>The <a class="csref" href="mod-attribute-collections.html#col_Common">Common</a> collection</dt>

<dd>A collection of other attribute collections, including: <a class="csref" href="mod-bidi.html#col_Bi-directional">Bi-directional</a>, <a class="csref" href="mod-core.html#col_Core">Core</a>, <a
class="csref" href="mod-edit.html#col_Edit">Edit</a>, <a class="csref" href="mod-embedding.html#col_Embedding">Embedding</a>, <a class="csref" href="mod-xml-events.html#col_Events">Events</a>, <a
class="csref" href="mod-xforms.html#col_Forms">Forms</a>, <a class="csref" href="mod-hyperAttributes.html#col_Hypertext">Hypertext</a>, <a class="csref" href="mod-i18n.html#col_I18N">I18N</a>, <a
class="csref" href="mod-csImgMap.html#col_Map">Map</a>, and <a class="csref" href="mod-metaAttributes.html#col_Metainformation">Metainformation</a>.</dd>
</dl>

<!-- END OF ATTRIBUTE FILE modules/attributes/Common.mhtml --></div>

<p>The <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.) and assign
values to those properties. This specification defines a small normative set of properties, but users may extend this set as described for the <a class="aref" href= 
"mod-metaAttributes.html#adef_metaAttributes_property">property</a> attribute.</p>

<p>Each <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> element specifies a property/value pair. The <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_property">
property</a> attribute identifies the property and the content of the element or the value of the <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_content">content</a> attribute
specifies the property's value.</p>

<p>For example, the following declaration sets a value for the <code>Author</code> property:</p>

<div class="example">
<p>Example</p>

<pre>
&lt;meta property="dc:creator"&gt;Steven Pemberton&lt;/meta&gt;
</pre>
</div>

<div class="note">
<p><em><strong>Note.</strong> The <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> element is a generic mechanism for specifying metadata. However, some XHTML elements and attributes
already handle certain pieces of metadata and may be used by authors instead of <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> to specify those pieces: the <a class="eref" href= 
"mod-document.html#edef_document_title">title</a> element, the <a class="eref" href="mod-structural.html#edef_structural_address">address</a> element, the <a class="aref" href= 
"mod-edit.html#adef_edit_edit">edit</a> and related attributes, the <a class="aref" href="mod-core.html#adef_core_title">title</a> attribute, and the <a class="aref" href= 
"mod-hyperAttributes.html#adef_hyperAttributes_cite">cite</a> attribute.</em></p>
</div>

<div class="note">
<p><em><strong>Note.</strong> When a property specified by a <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> element takes a value that is a <span class="datatype"><a href= 
"abstraction.html#dt_URI">URI</a></span>, some authors <span class="index-inst" title="metadata::LINK vs meta"><a name="idx-meta_data-2">prefer</a></span> to specify the metadata via the <a class= 
"eref" href="mod-meta.html#edef_meta_link">link</a> element. Thus, the following metadata declaration:</em></p>
</div>

<div class="example">
<p>Example</p>

<pre>
&lt;meta property="dc:identifier"&gt;
      http://www.rfc-editor.org/rfc/rfc3236.txt
&lt;/meta&gt;
</pre>
</div>

<p><em>might also be written:</em></p>

<div class="example">
<p>Example</p>

<pre>
&lt;link rel="dc:identifier"
      href="http://www.rfc-editor.org/rfc/rfc3236.txt" /&gt;
</pre>
</div>

<h3><a id="sec_23.2.1." name="sec_23.2.1.">23.2.1.</a> meta and search engines</h3>

<p>A common use for <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> is to specify keywords that a <span class="index-inst" title="search engine::helping"><a name="idx-search_engine">
search engine</a></span> may use to improve the quality of search results. When several <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> elements provide language-dependent information
about a document, search engines may filter on the <a class="aref" href="mod-i18n.html#adef_i18n_xml:lang">xml:lang</a> attribute to display search results using the language preferences of the user.
For example,</p>

<div class="example">
<p>Example</p>

<pre class="example">
&lt;!-- For speakers of US English --&gt;
&lt;meta property="keywords" 
      xml:lang="en-us"&gt;vacation, Greece, sunshine&lt;/meta&gt;
&lt;!-- For speakers of British English --&gt;
&lt;meta property="keywords" 
      xml:lang="en"&gt;holiday, Greece, sunshine&lt;/meta&gt;
&lt;!-- For speakers of French --&gt;
&lt;meta property="keywords" 
      xml:lang="fr"&gt;vacances, Gr&#232;ce, soleil&lt;/meta&gt;
</pre>
</div>

<p>The effectiveness of search engines can also be increased by using the <a class="eref" href="mod-meta.html#edef_meta_link">link</a> element to specify links to translations of the document in
other languages, links to versions of the document in other media (e.g., PDF), and, when the document is part of a collection, links to an appropriate starting point for browsing the collection.</p>

<!-- END OF ELEMENT FILE modules/meta/meta.mhtml -->
<h2><a id="sec_23.3." name="sec_23.3.">23.3.</a> Literals and Resources</h2>

<p>There are two types of properties that some item can have. The first is a simple string value, which is useful for specifying properties such as dates, names, numbers and so on:</p>

<div class="example">
<p>Example</p>

<pre>
this document was written on "March 21st, 2004"
</pre>
</div>

<p>This is not so useful though when trying to uniquely identify items that could occur in other places. Take the example of the document's author being "Mark Birbeck":</p>

<div class="example">
<p>Example</p>

<pre>
this document was written by "Mark Birbeck"
</pre>
</div>

<p>Since there are other people called Mark Birbeck, then we won't know which of them wrote what. We get round this problem by allowing the value referred to, to be a URI. For example:</p>

<div class="example">
<p>Example</p>

<pre>
this document was written by
&lt;http://example.com/people/MarkBirbeck/654&gt;
</pre>
</div>

<p>We distinguish these two types of properties by calling the first a 'string literal' and the second a 'resource'.</p>

<p>NOTE: Of course there is nothing to stop two people from using this URI to identify two completely different people. But in general URIs are accepted as a convenient way to identify a specific
item.</p>

<h2><a id="sec_23.4." name="sec_23.4.">23.4.</a> Document Properties</h2>

<h3><a id="sec_23.4.1." name="sec_23.4.1.">23.4.1.</a> Literals</h3>

<h4><a id="sec_23.4.1.1." name="sec_23.4.1.1.">23.4.1.1.</a> String Literals</h4>

<p>The simplest piece of metadata is a string literal attached to the containing document. This can be specified using <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a>. For example:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;meta property="dc:creator"&gt;Mark Birbeck&lt;/meta&gt;
    &lt;meta property="dc:created" content="2004-03-20" /&gt;
  &lt;/head&gt;
</pre>
</div>

<p>which states that:</p>

<div class="example">
<p>Example</p>

<pre>
  this document has an 'author' property of "Mark Birbeck";
  this document has a 'created' property of "2004-03-20".
</pre>
</div>

<h4><a id="sec_23.4.1.2." name="sec_23.4.1.2.">23.4.1.2.</a> XML Literals</h4>

<p>It is also possible to include mark-up in the string. This will always be part of the string's value - in other words, no matter what the mark-up is, it will never be processed as if it were
anything other than the value of the property:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;meta property="dc:creator" content="Albert Einstein" /&gt;
    &lt;meta property="dc:title"&gt;E = mc&lt;sup&gt;2&lt;/sup&gt;: The Most Urgent Problem
of Our Time&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<p>states that:</p>

<div class="example">
<p>Example</p>

<pre>
  this document has an 'author' property of "Albert Einstein";
  this document has a 'title' property of 
      "E = mc&lt;sup&gt;2&lt;/sup&gt;: The Most Urgent Problem of Our Time".
</pre>
</div>

<p>However, just because the mark-up is not processed as mark-up does not mean it need not be well-formed and valid if the processor requires it.</p>

<h4><a id="sec_23.4.1.3." name="sec_23.4.1.3.">23.4.1.3.</a> Typed Literals</h4>

<p>In some situations the value of a property is not sufficiently specified by a simple literal. For example, properties such as height or weight would require more than a string to fully specify
them:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;meta property="height"&gt;87&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<p>In cases such as this it is not clear whether we are dealing with metres, miles or microns. Whilst it's certainly possible to add the units to the literal itself there will be situations where
this is not possible, and so the unit should be specified with <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_datatype">datatype</a> In this example we use the XML Schema type for
date:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;meta property="created" datatype="xsd:date"&gt;2004-03-22&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<h3><a id="sec_23.4.2." name="sec_23.4.2.">23.4.2.</a> Resources</h3>

<p>There will be situations when a string literal is not suitable as the value of a property. In the example just given there would be no way to know which 'Mark Birbeck' we are referring to. This
might not be a problem when documents are only used within one company, but this becomes a big problem when documents are used across the internet.</p>

<p>When we need to provide a unique identifier for the value of a property we use <a class="eref" href="mod-meta.html#edef_meta_link">link</a>. <a class="eref" href="mod-meta.html#edef_meta_link">
link</a> identifies a <em>relationship</em> between one resource and another, and uses <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_rel">rel</a> to indicate the nature of this
relationship. In addition <a class="aref" href="mod-hyperAttributes.html#adef_hyperAttributes_href">href</a> contains the URI that is being used to uniquely identify the item being related to. For
example:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;link rel="author"
          href="http://example.com/people/MarkBirbeck/654" /&gt;
  &lt;/head&gt;
</pre>
</div>

<p>Note that just because we are using URIs as unique identifiers doesn't mean that navigating to this URI with a web browser would yield anything useful. This is perhaps easier to see with the
following example:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head&gt;
    &lt;link rel="source" href="urn:isbn:0140449132" /&gt;
  &lt;/head&gt;
</pre>
</div>

<h3><a id="sec_23.4.3." name="sec_23.4.3.">23.4.3.</a> Making Use of External Lists of Properties</h3>

<p>Best practice for specifying metadata is to try as much as possible to make use of common property names. This can often be achieved by using lists in use by other document authors within a
similar field. There are many such lists for different sectors and industries, but for our examples here we will use Dublin Core[<a class="nref" href="references.html#ref_DCORE">DCORE</a>].</p>

<p>To replace the term 'author' with the more widely used Dublin Core term 'creator', we would need to not only substitute 'creator' for 'author', but also to indicate which list we are using. We
achieve the latter by using XML namespaces:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;meta property="dc:creator"&gt;Mark Birbeck&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<p>Now we have stated that:</p>

<div class="example">
<p>Example</p>

<pre>
  this document has a property called 'creator' (which comes
  from a library of properties called the Dublin Core) and the
  value of that property is the literal "Mark Birbeck".
</pre>
</div>

<h2><a id="sec_23.5." name="sec_23.5.">23.5.</a> Properties of Other Resources</h2>

<p>While it is common to create properties and values that say something about the document that contains them, there is often a need to add metadata that refers only to a section of the document, or
to some external resource. This is achieved by using <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_about">about</a>, which can be present on <a class="eref" href= 
"mod-meta.html#edef_meta_meta">meta</a> and <a class="eref" href="mod-meta.html#edef_meta_link">link</a>.</p>

<h3><a id="sec_23.5.1." name="sec_23.5.1.">23.5.1.</a> Resources Within the Containing Document</h3>

<p>A quote might be attributed as follows:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;html xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;head&gt;
      &lt;link about="#q1" rel="dc:source" href="urn:isbn:0140449132" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;blockquote id="q1"&gt;
        &lt;p&gt;
          'Rodion Romanovitch! My dear friend! If you go on in this way
          you will go mad, I am positive! Drink, pray, if only a few drops!'
        &lt;/p&gt;
      &lt;/blockquote&gt;
    &lt;/body&gt;
  &lt;/html&gt;
</pre>
</div>

<p>Note that the absence of <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_about">about</a> does not always mean that the metadata refers to the containing document. If the element
containing metadata is a child of <a class="eref" href="mod-document.html#edef_document_head">head</a>, then it does relate to the document, and so the following mark-up:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;meta property="dc:creator"&gt;Mark Birbeck&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<p>can be regarded as a shorthand for this:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;meta about="" property="dc:creator"&gt;Mark Birbeck&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<h3><a id="sec_23.5.2." name="sec_23.5.2.">23.5.2.</a> External Resources</h3>

<p>There is also a need to add metadata to a document that concerns an item that is external to the document. As before we use <a class="aref" href=
"mod-metaAttributes.html#adef_metaAttributes_about">about</a>, but this time we should provide an absolute or relative URI, rather than just a fragment identifier.</p>

<p>An example might be to say that the copyright of some document is owned by a company, and further, that the company is located in London:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;link rel="dc:copyright"
          href="http://example.com/company/BBC/6" /&gt;
    &lt;meta about="http://example.com/company/BBC/6"
          property="dc:location"&gt;London&lt;/meta&gt;
  &lt;/head&gt;
</pre>
</div>

<h2><a id="sec_23.6." name="sec_23.6.">23.6.</a> Chaining Metadata</h2>

<p>Metadata that is relevant to a resource referred to by a <a class="eref" href="mod-meta.html#edef_meta_link">link</a> can be placed inside the <a class="eref" href="mod-meta.html#edef_meta_link">
link</a> element with no <a class="aref" href="mod-metaAttributes.html#adef_metaAttributes_about">about</a>. Our previous example could be re-written as follows:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;head xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
    &lt;link rel="dc:copyright"
          href="http://example.com/company/BBC/6"&gt;
      &lt;meta property="dc:location"&gt;London&lt;/meta&gt;
    &lt;/link&gt;
  &lt;/head&gt;
</pre>
</div>

<p>There is no limit to the depth of this nesting.</p>

<div class="issue">
<p id="s_metamodule_issue_0" class="issueTitle">What attribute is this?</p>

There is no resource attribute any longer. What was it changed to in this context?</div>

<p>If resource is omitted from a <a class="eref" href="mod-meta.html#edef_meta_link">link</a> then the nested metadata is still legitimate, it simply relates to an anonymous resource. For example, we
might want to say that the 'mother tongue' of the author of <em>Crime and Punishment</em> is Russian, without saying anything further about the author:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;html xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:con="http://example.org/terms/" &gt;
    &lt;head /&gt;
    &lt;body&gt;
      &lt;blockquote id="q1"&gt;
        &lt;link rel="dc:source" href="urn:isbn:0140449132"&gt;
          &lt;link rel="dc:creator"&gt;
            &lt;meta property="con:motherTongue"&gt;rus&lt;/meta&gt;
          &lt;/link&gt;
        &lt;/link&gt;
        &lt;p&gt;
          'Rodion Romanovitch! My dear friend! If you go on in this way
          you will go mad, I am positive! Drink, pray, if only a few drops!'
        &lt;/p&gt;
      &lt;/blockquote&gt;
    &lt;/body&gt;
  &lt;/html&gt;
</pre>
</div>

<p>When reading this metadata, the anonymous resource can be thought of simply as <em>'something'</em>. This mark-up means:</p>

<ol>
<li>The quote has a source of <em>Crime and Punishment</em>.</li>

<li><em>Crime and Punishment</em> has a property of 'creator' (from the Dublin Core taxonomy), and the value of that property is <em>something</em>.</li>

<li>The <em>something</em> that is the author of <em>Crime and Punishment</em> has a property of 'mother tongue' (from the SWAP contacts taxonomy), and the value of that Property is "Russian".</li>
</ol>

<p>Note however that while placing further elements inside <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> is structurally valid, it does not mean the same thing as the example we have
just given, since the content of <a class="eref" href="mod-meta.html#edef_meta_meta">meta</a> is an XML literal. The following:</p>

<div class="example">
<p>Example</p>

<pre>
  &lt;blockquote id="q1"&gt;
    &lt;link about="#q1" rel="dc:source" href="urn:isbn:0140449132"&gt;
      &lt;meta property="dc:creator"&gt;
        &lt;meta property="con:motherTongue"&gt;rus&lt;/meta&gt;
      &lt;/meta&gt;
    &lt;/link&gt;
    &lt;p&gt;...&lt;/p&gt;
  &lt;/blockquote&gt;
</pre>
</div>

<p>means that:</p>

<ol>
<li>the quote has a source of <em>Crime and Punishment</em>.</li>

<li><em>Crime and Punishment</em> has a property of 'creator' (from the Dublin Core taxonomy), and the value of that property is the XML literal "&lt;meta
property="con:motherTongue"&gt;rus&lt;/meta&gt;".</li>
</ol>

<!-- errors said Getting issues from Meta
 -->
<h2><a id="sec_23.7." name="sec_23.7.">23.7.</a> Issues</h2>

<div class="issue">
<p id="s_metamodule_issue_1" class="issueTitle">rebuild link element: chapter, section / subsection <span class="pr">PR #7869</span><br />
State: Open<br />
Resolution: None<br />
User: None</p>

<p><b>Notes:</b><br />
</p>
</div>

<hr />
<div class="navbar">[<a href="mod-mediaAttribute.html">previous</a>] &#160; [<a href="mod-metaAttributes.html">next</a>] &#160; [<a href="Overview.html#toc">table of contents</a>] &#160;[<a href= 
"elements.html">elements</a>] &#160;[<a href="attributes.html">attributes</a>]</div>
</body>
</html>