It is very useful to break up large catalogs into pieces and separately maintain each piece. One way to do this is to build each piece as a separate and logically-complete catalog, then create a master catalog using catalog references:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="" 
         name="Top Catalog" xmlns:xlink=""> <!-- 1 -->
   <dataset name="Realtime data from IDD" ID="IDD">  <!-- 2 -->
     <catalogRef xlink:href="idd/forecastModels.xml" 
                 xlink:title="Forecast Model Data" name=""/> <!-- 3 -->
     <catalogRef xlink:href="idd/forecastProdsAndAna.xml" 
                 xlink:title="Forecast Products and Analyses" name=""/> <!-- 3 -->
     <catalogRef xlink:href="idd/obsData.xml" 
                 xlink:title="Observation Data" name=""/> <!-- 3 -->
     <catalogRef xlink:href="idd/radars.xml" 
                 xlink:title="Radar Data" name=""/> <!-- 3 -->
     <catalogRef xlink:href="idd/satellite.xml" 
                 xlink:title="Satellite Data" name=""/> <!-- 3 -->

  <catalogRef xlink:title="Far Away University catalog" 
              xlink:href="" />    <!-- 4 -->
  1. We declare the xlink namespace in the catalog element.
  2. The collection (or container) dataset logically contains the catalogRefs, which are thought of as nested datasets whose contents are the contents of the external catalog.
  3. Here are several catalogRef elements, each with a link to an external catalog, using the xlink:href attribute. The xlink:title is used as the name of the dataset. We need a name attribute (in order to validate, for obscure reasons), but it is ignored. The xlink:href attributes are relative URLs and are resolved against the catalog URL. For example, if the URL of the client catalog, as shown above, is:

    then the resolved URL of the first catalogRef will be:

  4. catalogRefs needn’t point to local catalogs only; this one points to a remote one at Far Away University.
    • The metadata elements with inherited="true" are NOT copied across catalogRefs. The catalog that a catalogRef refers to is stand-alone in that sense.