About metadata

Metadata is semantic information about the information in a document, for example the name of the document's author, the date the document was created, the name of the product the information is describing, the target audience, and copyright information.

In DITA you can specify metadata at the topic or map level, with map-level metadata overriding topic entries.

Example

<metadata>
<keywords>
<keyword>Ant script</keyword>
<indexterm>Ant scripts
<indexterm>definition</indexterm>
<indexterm>usage</indexterm>
</indexterm>
</keywords>
<prodinfo>
<prodname>DITA Open Toolkit</prodname>
<vrmlist>
<vrm version="1.3.1"/>
</vrmlist>
</prodinfo>
</metadata>
			

Providing metadata in DITA source files

The <prolog> section of a DITA source file can contain metadata about the source file including the author(s), date created, and keywords describing what the file is about. For instance, the source for this DITA topic contains the following metadata:

<prolog>
<author type="creator">Anna van Raaphorst</author>
<author type="contributor">Richard Johnson</author>
<publisher>OASIS (Organization for the Advancement of Structured Information Standards)</publisher>
<copyright>
<copyryear year="2007"/>
<copyrholder>VR Communications, Inc.</copyrholder>
</copyright>
<critdates>
<created date="2006-June-10"/>
<revised modified="2007-April-03"/>
</critdates>
<metadata>
<keywords>
<keyword>accessing information</keyword>
<keyword>metadata</keyword>
<indexterm>metadata</indexterm>
</keywords>
<prodinfo>
<prodname>DITA Open Toolkit</prodname>
<vrmlist>
<vrm version="1.3.1"/>
</vrmlist>
</prodinfo>
</metadata>
</prolog>
		

How the Toolkit processes metadata

In some cases, the output produced by a Toolkit build will contain content based on the metadata in the source file. For instance, when this source file is processed to XHTML, the output files will contain metadata in the Dublin Core format. Here is the metadata in the XHTML output for the source file above:

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="About metadata" />
<meta content="accessing information, metadata" name="DC.subject" />
<meta content="accessing information, metadata" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../accessing/accessing.html" />
<meta name="prodname" content="DITA Open Toolkit" />
<meta content="1.3.1" name="version" />
<meta content="Anna van Raaphorst" name="DC.Creator" />
<meta content="Richard Johnson" name="DC.Contributor" />
<meta content="OASIS (Organization for the Advancement of Structured Information Standards)" name="DC.Publisher" />
<meta name="copyright" content="VR Communications, Inc. 2007" type="primary" />
<meta name="DC.Rights.Owner" content="VR Communications, Inc. 2007" type="primary" />
<meta content="2006-June-10" name="DC.Date.Created" />
<meta content="2007-April-03" name="DC.Date.Modified" />
<meta content="XHTML" name="DC.Format" />
<meta content="aboutmetadata" name="DC.Identifier" />
<link href="../CSS/commonltr.css" type="text/css" rel="stylesheet" />
<link href="../CSS/DITAOTUG_CSS.css" type="text/css" rel="stylesheet" />
<title>About metadata</title>
</head>