MODS and XPath Syntax

The Metadata Object Description Schema (MODS) is a hierarchical XML-based bibliographic description schema created by the Library of Congress’ Network Development and MARC Standards Office. MODS is meant to be a compromise between the complex MARC system and the simplistic Dublin Core metadata.

 

The advantages to using MODS are:

  • Compatibility with existing resource descriptions

  • Supports locality

  • Because it is less detailed than MARC internal record elements can be mapped

The MODS schema sheets and official documentation can be found at the official LOC's MODS page.


XML Path Language (XPath) is a query language employed by the XML forms in the repository to both write the proper nodes to the MODS XML datastream and read the nodes from that datastream to display in the form.


How XPath Syntax and XML match up (color coded):


XPath Syntax noted in metadata mapping sheets and employed in XML forms

mods:titleInfo[@lang="eng" @displayLabel="Title (English)"]/mods:title


Resulting XML in MODS datastream

<mods xmlns="http://www.loc.gov/mods/v3" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">

 <titleInfo lang="eng" displayLabel="Title (English)">

    <title>Test Collection</title>

 </titleInfo>