Skip to content

contentdm_maps_more

Benjamin Riesenberg edited this page Apr 26, 2024 · 15 revisions

more notes: contentdm_maps

🚧🚧🚧

NOTE
The schemasProject and contentdm_maps repositories must be placed within the same directory in your filesystem

| ...
| schemasProject/
| contentdm_maps/
| ...

creating metadata guidance documents

Creating metadata guidance documents for publication at uwlib-mig.github.io/contentdm_maps/ requires:

  • An XML MAP document, as defined by xsd/xml_maps.xsd
  • Default or custom metadata-creation guidance, example values, and field configuration details entered in schemasProject/properties-files, each corresponding to a metadata field which will be implemented for the collection.
  • The stylesheet xml_map_properties_files_to_html.xsl and stylesheets from contentdm_maps and webviews which it includes.

Create an XML MAP document - contentdm_maps/xml/*

contentdm_maps metadata guidance documents have one or more sections. In each section, metadata-creation guidance (instructions) and example values are provided for a set of objects which:

  1. Are grouped together for the purpose of creating metadata by a common genre/form term, or grouped together using a general category term such as 'default'
  2. Have the same CONTENTdm object type, either:
    • standalone items
    • compound objects, including both compound object (or containers) and the compound-object items (files) which each contains

Depending on the number of sections and the type of CONTENTdm objects to be used for a given category of resources, section specifications may also include:

  • Indication of properties, if any, which will not be used to describe objects
  • In the case of CONTENTdm compound objects:
    • Indication of properties, if any, which will not be used to describe compound objects
    • Indication of properties which will be used to describe compound-object items

genre_form

  • For each category of objects in the collection for which metadata-creation should follow the same basic guidelines, select, or add and use, an enumeration from schemasProject/xsd/genre_form.xsd (a MAP may only have one section)
  • The enumerations in schemasProject/xsd/genre_form.xsd constrain allowable values in contentdm_maps/xml/ XML MAP file genre_form elements, and also in schemasProject/properties_files/ XML property file @genre_form attributes
  • MAP sections categorize groups of resources in a collection using sometimes broad or uncontrolled genre/form terms such as 'text'; collection metadata creators may use fields such as genreFormLcgft to assign more specific, controlled terms to individual objects for search and discovery.

cdm_object_type

  • For each category represented in the MAP, indicate whether resources will be presented as compound objects (use value 'compound_object') or standalone items (use value 'standalone_item')
For sections with cdm_object_type = standalone_item

exclude_for_genre_form

<exclude_for_genre_form>^p6$|^p19$|^p137$|^p99$|^p50$</exclude_for_genre_form>
  • Select, if any, properties which will not be used to describe this category
    • In MAPs with only one category where properties have been selected for use with all resources, this element will not be needed
    • In maps with multiple categories, some properties may be needed for only some categories
  • Specify by 'p-number' to exclude - see schemasProject/properties-files > schemas:property/schemas:uid
  • Validation:
    • Required prefix for each p-number: '^'
    • Required suffix for each p-number: '$'
    • Required delimiter between each p-number: '|'
For sections with cdm_object_type = compound_object

exclude_for_co

<exclude_for_co>^p130$|^p45$|^p131$|^p132$|^p138$|^p139$|^p47$|^p140$|^p46$|^p141$|^p136$|^p137$</exclude_for_co>
  • Select, if any, properties which will not be used to describe compound objects in this category
  • Specify by 'p-number' to exclude - see schemasProject/properties-files > schemas:property/schemas:uid
  • Order does not matter
  • Validation:
    • Required prefix for each p-number: '^'
    • Required suffix for each p-number: '$'
    • Required delimiter between each p-number: '|'

include_for_co_items

<include_for_co_items>^p88$|^p28$|^p71$|^p90$|^p29$|^p134$</include_for_co_items>
  • Select the properties which will be used to describe the compound-object items in this category
  • Specify by 'p-number' to include - see schemasProject/properties-files > schemas:property/schemas:uid
  • Validation:
    • Required prefix for each p-number: '^'
    • Required suffix for each p-number: '$'
    • Required delimiter between each p-number: '|'

Select properties

contentdm_maps metadata guidance documents are structured around a set of selected 'properties' to be used to describe objects in the collection. Property data is stored at uwlib-mig/schemasProject and includes default and custom guidance for creating metadata for each 'property' (implemented as a field in the CONTENTdm collection), example values, and recommended field configurations for use in setting up and administering the CONTENTdm collection. Where updated or custom guidance is desired for creating metadata for a property (field) for a given collection, CONTENTdm object type, and/or genre/term categorization, this content must be tagged for output as described in schemasProject_more.

To include properties for use within a collection, provide a list of XML property data files within the xml_map/properties element, using xi:include elements, as in the following example:

<?xml version="1.0" encoding="UTF-8"?>
<xml_map xmlns="https://uwlib-mig.github.io/contentdm_maps/xsd/"
    xsi:schemaLocation="https://uwlib-mig.github.io/contentdm_maps/xsd/ 
    https://uwlib-mig.github.io/contentdm_maps/xsd/xml_map.xsd"
    xmlns:xi="http://www.w3.org/2001/XInclude" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <coll_alias>becker</coll_alias>
    [...]
    <properties>
        <xi:include href="../../schemasProject/properties-files/title.xml"/>
        <xi:include href="../../schemasProject/properties-files/titleNonLatin.xml"/>
        <xi:include href="../../schemasProject/properties-files/author.xml"/>
        <xi:include href="../../schemasProject/properties-files/contributor.xml"/>
        <xi:include href="../../schemasProject/properties-files/photographer.xml"/>
    </properties>
</xml_map>

notes

  • Schema annotations in xsd/xml_maps.xsd provide some further information
  • ⚠ XML documents in contentdm_maps/xml/ with file name _[map name]-dd.xml have not been updated to conform to xsd/xml_maps.xsd and function as described here

Reference tool - xsl/properties_in_xml_map.xsl

This stylesheet may be helpful when editing XML map exclude_for_co, exclude_for_genre_form, and include_for_co_items element values, as it provides an easy-to-reference listing of properties included in a MAP along with uids/p-numbers.

  • Edit the top-level param $xml_map_filename in the stylesheet to select the XML MAP for which to display properties/uid p-numbers
  • Configure transformation scenario for xsl/properties_in_xml_map.xsl in Oxygen 'Edit scenario' as follows:
    • XSLT > XML URL = ${currentFileURL}
    • XSLT > XSL URL = ${currentFileURL}
    • Output > Show in results view as > XML

xsl/xml_map_properties_files_to_html.xsl

This stylesheet processes a completed XML MAP document, along with included schemasProject/properties-files data, to output and publish an HTML MAP metadata guidance document in the main branch html/ directory of the contentdm_maps repository using GitHub pages.

  • This stylesheet includes
  • Configure transformation scenario for xsl/cdm_aliases_to_schema.xsl in Oxygen 'Edit scenario' as follows:
    • XSLT > XML URL = ${currentFileURL}
    • XSLT > XSL URL = ${currentFileURL}
    • Parameters > xml_map_filename = (filename of XML MAP for a given collection alias, including .xml file extension, for example, becker.xml)
  • This stylesheet transformation could also be invoked from the command line or from a script, passing in the xml_map filename as a parameter once, or iterating through a set of xml_map filenames

contentdm_maps/index.html