Importing additional MODS info to Tellico

Tellico only imports a subset of all the information contained in the records returned from a z39.50 search. Internally, since I was lazy, Tellico uses the yaz library to convert USMarc and Marc21 records into the MODS format, then uses the mods2tellico.xsl stylesheet to convert the MODS data into a Tellico collection.

Someone emailed me about including the Library of Congress Call Number in the imported data. It’s easy enough to add, if you don’t mind editing the mods2tellico.xsl file. Here’s a patch:

Index: mods2tellico.xsl
--- mods2tellico.xsl    (revision 964)
+++ mods2tellico.xsl    (working copy)
@@ -79,6 +79,10 @@
       <prop name="bibtex">address</prop>
       <prop name="bibtex">address</prop>
+    <!-- add LoC call number, can't call it lccn though -->
+   <field flags="0" title="Call Number" category="Publishing" format="4" type="1"
+   name="lcc" description="Library of Congress Call Number" />
 <!-- for now, go the route of bibliox, and assume only text records
   with an originInfo/publisher element are actually books -->
@@ -184,6 +188,11 @@
    <xsl:value-of select="mods:identifier[@type='lccn']"/>

+  <!-- add call number -->
+  <lcc>
+   <xsl:value-of select="mods:classification[@authority='lcc']"/>
+  </lcc>
    <xsl:for-each select="mods:note">
     <xsl:value-of select="."/>

Basically, if you’re not familiar with the diff format, just add the lines with a plus sign in front of them to the mods2tellico.xsl file, in the indicated position.