Child pages
  • Field Configuration
Skip to end of metadata
Go to start of metadata

One way is having xpath-like paths to mods fields in the configuration as shown in the example below. This approach requires knowing the details of a specific end result format (such as MODS below). The second approach depicted below allows for default values for fields that are not to be modified by users.

<?xml version="2.0" encoding="UTF-8"?>
<configurableInterface xmlns="http://dlib.indiana.edu/xml/fieldConfig/version0.1/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://dlib.indiana.edu/xml/fieldConfig/version0.1/ file:/C:/projects/dev/ClickCataloger/xsd/fieldConfig.xsd">

  <storageDefinition>
    <documentRoot>mods:mods</documentRoot>
    <namespace>
      <prefix>mods</prefix>
      <ns>http://www.loc.gov/mods/v3</ns>
    </namespace>
    <namespace>
      <prefix>dc</prefix>
      <ns>http://www.loc.gov/dc/v3</ns>
    </namespace>
    <templateRecord>
      <mods:mods xmlns:mods="http://mopds"></mods:mods>
    </templateRecord>
  </storageDefinition>

  <interfaceDefinition name="default form">
    <page seq="1" title="Enter metadata">
      <field name="title">
        <inputType>Text</inputType>
        <dataPath>mods:titleInfo/mods:title</dataPath>
        <repeatable>true</repeatable>
        <required>false</required>
        <label>Title: </label>
        <numOccurrence>3</numOccurrence>
        <visible>true</visible>
        <description>Title field</description>
      </field>
      <field name="identifier">
        <inputType>Text</inputType>
        <dataPath>mods:identifier[@displayLabel='Acquisition number'][@type='local']</dataPath>
        <repeatable>false</repeatable>
        <required>false</required>
        <label>Identifier: </label>
        <numOccurrence>1</numOccurrence>
        <visible>true</visible>
        <description>Acquisition number</description>
      </field>
      <field name="accessConditionType">
        <inputType>Text</inputType>
        <dataPath>mods:accessCondition/@type</dataPath>
        <repeatable>false</repeatable>
        <required>true</required>
        <label>Access condition: </label>
        <numOccurrence>1</numOccurrence>
        <visible>true</visible>
        <description>Access condition</description>
      </field>
      <field name="label">
        <inputType>Text</inputType>
        <dataPath>mods:note[@displayLabel='Label text']</dataPath>
        <repeatable>true</repeatable>
        <required>true</required>
        <label>Label: </label>
        <numOccurrence>2</numOccurrence>
        <visible>true</visible>
        <description>Extra labels</description>
      </field>
      <field name="other">
        <inputType>Choice</inputType>
        <dataPath>mods:test/mods:test2</dataPath>
        <repeatable>false</repeatable>
        <required>false</required>
        <label>Choice field</label>
        <numOccurrence>1</numOccurrence>
        <visible>true</visible>
        <description>Another test</description>
        <choiceValues>
          <pair>
            <value>First</value>
            <label>First choice</label>
          </pair>
          <pair>
            <value>Second</value>
            <label>Second Choice</label>
          </pair>
        </choiceValues>
      </field>
      
    </page>
  </interfaceDefinition>
</configurableInterface>
  • No labels