Codelist Templates

From NOAA Environmental Data Management Wiki

These templates are almost the equivalent to a drop down pick list for ISO codelists when editing ISO XML.

How to import codelist templates into Oxygen

  1. Save this link as file to your desktop in a folder called 'Oxygen Resources'

In the Oxygen Editor

  1. select Options tab and then select Preferences from drop down menu (see Options, Preferences image right)
    Options, Preferences
    • A Preferences pop-box will appear with a tree menu on the left
  2. select Editor > Templates > Code Templates from tree menu
    • A Editor / Templates / Code Templates dialogue will appear on the right (see Code Template Dialog image right)
      Code Template Dialog Box
  3. Select Import button and find CodeListTemplatesOxygen.xml on your desktop
  4. Select OK
  5. You will get a confirmation message when this is complete (see Confirmation Message image right)
    Confirmation Message

How to utilize codelist templates in Oxygen

When editing ISO XML in Oxygen you will invariably come up with some XML tags like below. You will need to add the URL to the codelist and the desired value from that codelist. This page has a lot more About ISO Codelists.

<gmd:role>
  <gmd:CI_RoleCode codeList="" codeListValue=""></gmd:CI_RoleCode>
</gmd:role>

For quick editing - this is how you use the codelist templates in Oxygen: (see images on right)

  1. Highlight text for codelists
    1
  2. Select Document > Content Completion > Show Code Templates
    2
  3. There will be a dropdown list of all the options for all codelists
    3
  4. Select the appropriate codelist and desired value.
  5. Your highlighted text will be replaced with valid XML
<gmd:role>
 <gmd:CI_RoleCode 
   codeList="http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#CI_RoleCode" 
   codeListValue="custodian">
  custodian
 </gmd:CI_RoleCode>
</gmd:role>