MODS is expressed using the XML (Extensible Markup Language) schema language of the World Wide Web Consortium. XML provides markup for documents and is expected to allow more flexibility and detail than HTML (Hypertext Markup Language). It serves well as a syntax for metadata.
By using the XML schema language, MODS defines main elements, child elements (i.e. subelements), and attributes of elements and subelements. Content of elements are included in the lowest level elements so as to avoid "mixed content", which is when some elements contain character data interspersed with child elements. For instance, if <titleInfo> contains subelements for <title>, <partNumber>, <partName>, then <titleInfo> is only a wrapper tag to include the more specific elements <title>, <partNumber>, <partName> and does not contain any character data. (A "wrapper" tag is one that it used only as an element that binds together child elements, but contains no data other than tags.)
Attributes may be associated with elements at any level and are defined with the element with which they are associated. They serve to modify the element. Common attributes that occur throughout the schema are: type, encoding, and authority.
A MODS document contains a schema declaration that indicates the MODS namespace. Within a record or group of records it is optional to use the "mods" prefix before each element (and before the "mods" namespace declaration), since the MODS namespace is indicated in the record. It is most useful to use the prefix "mods:" before each element when combining a MODS record with XML data from another namespace, e.g. a MODS record within a METS document.
The schema declaration for MODS Version 3 is:
<mods xmlns:mods="http://www.loc.gov/mods/v3"> with filename mods-3-3.xsd.
or if using "mods" as a prefix to each element:
<mods: mods xmnls:mods="http://www.loc.gov/mods/v3"> with filename mods-3-3.xsd.
An "XSLT stylesheet" (Extensible Stylesheet Language Tranformation) may be written to transform the MODS data in some way for output. Examples include using a stylesheet to place the record into a template with easy-to-understand element names in XML; using a stylesheet to formulate a display that looks like a catalog card; using a stylesheet to transform coded data into textual form.
For the original document, see: