Internal BAG metadata XML schema (Bathymetry Solution)

When creating a new BIS geodatabase, a configuration XML file for Open Navigation Surface Bathymetric Attributed Grid (BAG) metadata is generated alongside your collection and extended metadata XML schemas. This is stored in the Metadata settings location and helps identify which metadata fields specific to a BAG are displayed throughout your BIS in sections and tabs titled Internal. This includes the Add Bathymetry window, Explore Bathymetry dialog box, Metadata Editor window, and Dataset Preview window.

By default, the ONSBagInternalMetadataDef.xml file parses and displays certain fields within a BAG’s internal metadata: Title, Abstract, Date, Contact Person, Responsible Organization, and Cellsize (X,Y).

警告警告:

While the information in this topic is useful to understanding your BIS metadata configuration, manual modification of the XML schema file is only recommended for advanced users of the BIS who are familiar with editing XML schemas. In particular, make sure to first close any instances of your BIS before editing this XML file.

The following shows the root element for the internal metadata.

<XmlMetadataDefinition  metadataType="ONSBagInternal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <XmlMetadataDefinitionFields>

If you need to modify the metadata XML file, you must not alter the metadataType value, since this value determines the metadata field display for the applicable dialog box or window. Reasons for modifying this XML file could include adding metadata fields in addition to the six default fields removing one or more of the six fields. This type of modification would allow you to customize the fields that are displayed automatically and without having to look at the internal metadata XML file itself as part of each BAG’s internal metadata.

注注:

Modifying your XML schema can introduce errors, which can corrupt your BIS and temporarily invalidate much of your metadata. For this reason, it is highly recommended that you make a backup copy of your metadata and always use an XML editing application that has built-in validation checks whenever modifying the schema directly.

The example below shows a breakdown of the element hierarchy in the internal metadata XML configuration file.

<XmlMetadataDefinition metadataType="ONSBagInternal" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <XmlMetadataDefinitionFields>
    <XmlMetadataDefinitionField title="" dataType="" searchable="" displayed="" baseXpath="" xmlNodeName="">
      <xmlDataRestriction restrictionType="">
      </xmlDataRestriction>
    </XmlMetadataDefinitionField>
  </XmlMetadataDefinitionFields>
</XmlMetadataDefinition>

Differences in release 1.5 and later

When version 1.5 of the BAG was released, it included an altered metadata structure that required an update to the ONSBagInternalMetadataDef.xml file. For this reason, in ArcGIS for Maritime:Bathymetry 10.2.2 and later, alternate XPath expressions are needed that denote where the same metadata attribute can be found in BAG 1.5 internal metadata as in a BAG 1.4 or earlier.

The following is an example of an existing field that is parsed for releases 1.4 and earlier:

<XmlMetadataDefinitionField title="Title" dataType="xmlTypeString" searchable="true" displayed="true" baseXpath="/MD_Metadata/identificationInfo/BAG_DataIdentification/citation/CI_Citation" xmlNodeName="title">
      <xmlDataRestriction restrictionType="XMLMetadataFieldStringRestriction">
        <MaxLength>100</MaxLength>
      </xmlDataRestriction>
    </XmlMetadataDefinitionField>

For that same field to be parsed for a release 1.5 BAG, an <XMLAlternateXpaths> field must be introduced:

<XmlMetadataDefinitionField title="Responsible Organization" dataType="xmlTypeString" searchable="true" displayed="true" baseXpath="/MD_Metadata/contact/CI_ResponsibleParty" xmlNodeName="organisationName">
      <XmlAlternateXpaths>
        <XmlAlternateXpath versionChanged="1.5.0" baseXpath="/MI_Metadata/contact/CI_ResponsibleParty/organisationName" xmlNodeName="CharacterString" />
      </XmlAlternateXpaths>
      <xmlDataRestriction restrictionType ="XmlMetadataFieldStringRestriction">
        <MaxLength>100</MaxLength>
      </xmlDataRestriction>
    </XmlMetadataDefinitionField>

This ensures an if-else condition, so that if the BaseXPath cannot be found within a BAG’s internal metadata, the alternate XPath will be used to find and parse the metadata attribute.

提示提示:

If you need to add a field in the configuration XML file with non-English characters in its title tag, ensure that the ONSBagInternalMetadataDef.xml file is saved with encoding set to UTF-8 and not ANSI. Specifying the encoding in Notepad is shown below.

Changing ANSI to UTF-8

Support for release 1.5 BAGs and later

If you’ve previously customized your ONSBagInternalMetadataDef.xml file, regardless of whether you’ve loaded release 1.5 BAGs into your BIS, you will need to manually update this XML once again to accommodate these alternate XPath expressions. Until this is done, any release 1.5 BAGs that are added to your BIS will not appear to possess any internal metadata attributes. This will ensure that when loading release 1.5 BAGs, the alternate metadata structure can be properly parsed and will display in the internal metadata sections and tabs.

4/27/2014