Linking from Finding Aids

From DLXS Documentation

Jump to: navigation, search

Main Page > Mounting Collections: Class-specific Steps > Mounting a Finding Aids Collection > Linking from Finding Aids Using ID Resolver



[edit] Linking from Finding Aids Using HREF Attributes in the DAO

Findaid Class is coded so that if DaoResolution is enabled and there is an href attribute to the <dao> element, it will check to see if it contains the string "http". If it does, FindaidClass will create a link based on the content of the href attribute of the <dao>. For example, the Archives of Michigan have DAOs in this form:

  <dao linktype="simple"  
      href="http://haldigitalcollections.cdmhost.com/u?/p4006coll15,18455" 
      show="new" 
      actuate="onrequest"
  >
    <daodesc>
      <p>
          [view image]
      </p>
    </daodesc>
  </dao>

Insert note here re: custom XSL for links in other elements other than DAO or for significantly different dao markup.

[edit] Linking from Finding Aids Using the ID Resolver

If there is no "http" string in the href attribute of a <dao>, FindaidClass assumes that the href attribute is actully an id and will look up that id in in the idresolver and build a link if it finds the ID in the IDRESOLVER table. The method FilterAllDaos_XML in $DLXSROOT/cgi/f/findaid/FindaidClass.pm can be overridden per collection if different behavior is needed.

If you decide to use this feature, you will want to modify the preprocessing script preparedocs.pl which out-of-the-box inserts the string 'dao-bhl-' after the href. Below is an example of a Bentley <dao> where the id number is 91153-1.

   <dao linktype="simple" href="91153-1" show="new" actuate="onrequest">
      <daodesc>
         <p>
            [view selected images]
          </p>
      </daodesc>
    </dao>

The preparedocs.pl program would append "dao-bhl-" to the "991153-1:

   <dao linktype="simple" href="dao-bhl-91153-1" show="new" actuate="onrequest">
      <daodesc>
         <p>
            [view selected images]
          </p>
      </daodesc>
    </dao>

The ID resolver would look up the id "dao-bhl-91153-1" and replace it with the appropriate URL. (The dao and its attributes including the href have been reformatted below to fit in the browser window, in real life they would all be on one line)

   <dao linktype="simple"  
    href="http://images.umdl.umich.edu/cgi/i/image/image-idx?q1=91153-1;rgn1=bhl_href;
    op2=And;q2=;rgn2=bhl_al;
    type=boolean;med=1;view=thumbnail;c=bhl"
    show="new" actuate="onrequest"
    >
      <daodesc>
         <p>
            [view selected images]
          </p>
      </daodesc>
    </dao>


In order to make use of ID resolution in Findaid Class :

  1. $gEnableDaoResolution must be set to 1 in $DLXSROOT/cgi/f/findaid/findaidclass.cfg
  2. You probably want to remove the processing in preparedocs.pl that adds the"dao-bhl-" prefix to DAOs
  3. The ID resolver must be set up as detailed in the link below
  4. You may want to subclass FindaidClass and override FindaidClass::FilterAllDaos_XML to provide collection-specific processing.


[edit] ID Resolver Data Transformation and Deployment

The ID Resolver is a CGI that takes as input a unique identifier and returns a URI. It is used, for example, by Harper's Weekly to link the text pages in Text Class middleware to the image pages in the Image Class middleware, and vice versa.

Plug something like the following in to your web browser and you should get something back. If you choose to test middleware on a development machine that uses the id resolver, make sure that the middleware on that machine is calling the resolver on the machine with the data, and not the resolver on the production server.

Information on how to set up the ID resolver

Top

Personal tools