Metadata Resolver Quick Start Guide

From NOAA Environmental Data Management Wiki

Xlink Resolver Quick Start Guide

The Xlink Resolver is a tool developed at NGDC for building a composite XML from a collection of components. Components are referenced from unresolved XML using the xlink attribute. Each xlink points to the storage location of the component. The resolver retrieves components via the xlink URL. Currently, the most common storage locations for components are Web Accessible Folders (WAFs) and the Docucomp Component Library. When the resolver runs it fetches each component from it's xlink referenced location, and embeds it in the input XML. Thus the input XML becomes resolved. For specific information about creating unresolved XML see the help section Creating an Unresolved Record.


Metadata Resolver

To access the single file resolver go to Record Services and select resolver.

1. To resolve enter the file path or URL to the unresolved XML record.
2. Select the 'File' or 'URL' Input Type radio button.
3. Select the 'Resolve' radio button.
4. Click submit and an XML view of the resolved record will display in the browser.

The resolved record will include a uuid attribute reference in the root element of each component. This reference lets human readers know that a component is being referenced, and the unique identifier for the component. The parent element of the component will include the xlink title attribute providing it was included in the input XML. Note the resolver tool will resolve nested components. It's not uncommon for component A to contain an xlink reference to component B, which contains an xlink reference to component C. In this case all nested components will be resolved recursively.

Simple Example

1. Create a simple component
a. Note the namespace declarations (xmlns) and uuid attribute in the root element.
b. A namespace declaration is required for each namespace (gmd and gco) used in the component.
c. A uuid is required for each component. It tags the component with a unique identifier.
    <gmd:CI_OnlineResource xmlns:gss="" 
            <gco:CharacterString>web browser</gco:CharacterString>
            <gco:CharacterString>NASA Global Change Master Directory</gco:CharacterString>
            <gco:CharacterString>Home Page</gco:CharacterString>

2. Publish the component to a web accessible location. For example the component created in step 1 has been published to the Docucomp library, and is accessible via the URL below. This is just an example. The component could be published to any web accessible location.

3. Create Input XML
a. Below is the unresolved parent XML to the component created in step 2.
b. This xml contains an xlink reference to the components web accessible location.
c. Save this file to a local directory.
            <gco:CharacterString>NASA Global Change Master Directory (GCMD) User Support Office</gco:CharacterString>
                <gmd:phone gco:nilReason="missing"/>
                <gmd:address gco:nilReason="missing"/>
                <gmd:onlineResource xlink:href="" xlink:title="GCMD"/>  

4. Resolve with Single File Resolver
Metadata Resolver
a. Browse to Input XML File (See Resolver Image to Right).
b. Set 'Input Type' to File
c. Set 'Xlink Action' to Resolve
d. Click the Submit button