Skip to main content

Investigating the Missing Link: https protocol in ArcCatalog

One of the main tasks of the CIC project is to transform all of the existing metadata into the ISO19115 standard.  This can be done in a variety of ways, each with pros and cons.  We encountered a group of records where we were losing online linkages during this process.  Troubleshooting the problem led to some interesting discoveries.


Issue:  A group of metadata files from one portal had online linkages in their FGDC metadata files.  When the Metadata Coordinator transformed these files using ArcGIS, the links disappeared.  What happened?


Diagnosis:  ArcCatalog does not recognize Hyper Text Transfer Protocol Secure (HTTPS) addresses.  It will save them in an ArcGIS 1.0 metadata format file, but will not export them to ISO.

Solution: The ArcGIS template file can be edited directly to include https:// linkages in the transformation. Click here to go to the solution.



Details: I inspected the original FGDC metadata file. Note: When opening an FGDC XML file in ArcCatalog, many of the elements are not editable.  To see them, the user must open the FGDC Metadata (read-only) section.  Under <Identification / Citation / Citation Information/>are the two links in greyed-out text.





Unsuccessful Test 1:  FGDC to ISO19139 in ArcCatalog:


This will create an ISO19139 XML file.  This will not be editable in ArcGIS, but we can view it.

Step 1: Use the Export Metadata tool with FGDC2ISO19139 selected


Step 2: Open the newly created file and scroll down to Distribution section:


Result:  No links are present.  Neither the ftp nor the https.





Unsuccessful Test 2:  FGDC to ArcGIS 1.0  to ISO19139 using ArcCatalog:

This will create an ArcGIS 1.0 metadata format file, which can then be exported to FGDC or ISO.

Step 1: Use the Upgrade Metadata tool with Upgrade Type FGDC_TO_ARCGIS

Step 2:  Open the newly created file and scroll down to Distribution-Transfer Options.  Notice that the ftp link is blue and is clickable.  The https link is still black and not clickable.


Step 3: Use the Export Metadata tool with ArcGIS2ISO19139 selected:

Step 4: Open the newly created file and scroll down to Distribution section:


Result: Note that the ftp link transferred, but the https link is not present.




Experimental Test 3:  ArcGIS 1.0  to ISO19139 using ArcCatalog.  Changing https:// to http://


Step 1:  Open the ArcGIS 1.0 file.  Manually edit the online linkages to change https:// into http://

Step 2:  Save the change and exit edit mode. Scroll down to the distribution section.  Note that both online locations are now blue, clickable links.


Step 3: Use the Export Metadata tool with ArcGIS2ISO19139 selected:

Step 4: Open the newly created file and scroll down to Distribution section:

Result: Note that both of the links came through.



At this point, we had identified that there is a problem with using https:// protocol links in ArcCatalog. Just removing the "s" is not a solution, however, because it is not the link that we want. It turned out to be a problem in the XSLT for this transformation. Here is how to fix it.
(Disclaimer: this involves slight changes to the program files in ArcGIS. Changing ESRI's program files is generally not a recommended practice, but we offer this solution, because it worked for us.)

Step 1: Find the XSL file called ArcGIS2ISO19139 in the Metadata\Translator\Transforms folder. The full path is: {ARCGIS_INSTALL_PATH}\Metadata\Translator\Transforms\ArcGIS2ISO19139.xsl

Step 2: Open this file in a text editor. Note that depending upon your computer's permissions, you may need to open the text editor application as an administrator. We will be making a small change and re-saving the file to the same location.

Step 3: Find line 3422. It should currently read:


<xsl:for-each select="onLineSrc[(starts-with(linkage,'http://') or starts-with(linkage,'ftp://')) and ((count(.//*[text()]) - count(./orDesc[starts-with(.,'0')])) &gt; 0)]"> 

 Note that ArcCatalog is only looking for links that start with http:// or ftp://. We need to add https://. Replace that line with the following:


<xsl:for-each select="onLineSrc[(starts-with(linkage,'https://') or starts-with(linkage,'http://') or starts-with(linkage,'ftp://')) and ((count(.//*[text()]) - count(./orDesc[starts-with(.,'0')])) &gt; 0)]">

Step 4: Save the file and try the transformation again.

Results: Both links were exported to the ISO file. Success!

Postscript:
The display of an https:// link in ArcCatalog is still still different, in that it is not blue nor clickable. If desired, this can also be fixed in a similar manner:
Find line 430 in {ARCGIS_INSTALL_PATH}\Metadata\Stylesheets\ArcGIS_Imports\general.xslt
change this: <xsl:when test="(substring($value,1,7) = 'http://') or (substring($value,1,7) = 'HTTP://') or (substring($value,1,6) = 'ftp://') or (substring($value,1,6) = 'FTP://')"><a target="_blank"> to this: <xsl:when test="(substring($value,1,8) = 'https://') or (substring($value,1,7) = 'http://') or (substring($value,1,7) = 'HTTP://') or (substring($value,1,6) = 'ftp://') or (substring($value,1,6) = 'FTP://')"><a target="_blank">