Using XML and XSL to transform and import records

by Jonathan Jacobsen Wednesday, July 29, 2009 6:53 PM

Why enter records into your database when you can have someone else do it for you? Or at least, why not borrow records from other sources and import them into your database? It’s quite easy to do, saving time and improving accuracy. One approach to this is:

  1. Use a service such as Bookwhere, Biblios.net or PubMed to search for records in numerous online databases, for materials such as books, journals, articles, videos, maps ­- anything that might have been catalogued by someone somewhere may be found (see our blog post on Biblios.net).
  2. Save records in MARC XML format (though any XML format can be used).
  3. In Genie (part of the Inmagic Library Suite), use the included Bookwhere XSLT to convert selected MARC tags to Genie fields and import records. (XSLT is short for Extensible Stylesheet Language Transformation, and is a language used to transform XML data into other formats).
  4. In Inmagic DB/Text, customize an XSLT to map MARC XML or any other XML data source to your data structure and import records.
  5. After importing records, you would of course further customize them to suit your database.

If you use Genie, it includes an XSLT (Bookwhere.xsl in the Genie ImporterFiles folder) that maps MARC XML fields into Genie fields. You can customize this XSLT further for your cataloging needs. For example, some MARC tag to Genie field mappings we have added include:

 

MARC Tags Genie Field
090 or 050 CatCallNumber
520 CatAbstract

856 subfield u

CatURL

856 subfield y

CarURLNotes

246, 247, 730, 740, 770, 772, 776, 780, 785, 787

CatAlternateTitle

Leader position 6 or 7

CatRecordType

Here's an example of the above Leader mapping added to the Genie Bookwhere.xsl transformation:

<xsl:template name="RecordType2" match="marc:leader">

<xsl:choose>

<xsl:when test="substring(marc:leader, 8, 1 )='s'">

'CatRecordType' Periodical

</xsl:when>

<xsl:when test="substring(marc:leader, 7, 1 )='a'">

'CatRecordType' Book

</xsl:when>

<xsl:when test="substring(marc:leader, 7, 1 )='g'">

'CatRecordType' Videorecording

</xsl:when>

</xsl:choose>

</xsl:template>

Virtually any XML file can be imported into a textbase using an XSL. The beauty of XSLT is that data cleanup can be done as part of the process. For example, ALL CAPS can be converted to Title case, fields can be separated or joined, dates can be transformed to other formats, and much more.

WebClarity releases BookWhere version 6

by Administrator Tuesday, June 26, 2007 3:01 PM
Customers with ongoing maintenance subscriptions may download this new version for no additional charge. Check out the new features or register for one of the WebClarity product overview webinars.

BookWhere is a great tool for the ongoing cataloguing of new library material as well as retrospective conversion projects. Hundreds of library databases worldwide can be searched and their bibliographic records exported in MARC communications format. These records can then be converted using the MARC Transformer add-on product and imported into Inmagic Genie or other Inmagic textbases.

Contact Andornot for more information and pricing.

Tags: News | BookWhere

BookWhere, MARC Records and Inmagic Genie

by Administrator Wednesday, January 17, 2007 10:32 PM

A client of ours recently started using the new BookWhere XML MARC record import feature of Inmagic Genie. They noticed that although the new feature allowed them to import MARC records nicely into Genie, it did not import a call number from any of the records. There are several MARC call numbers that could be used, depending on the classification system used by the Genie user. See http://www.loc.gov/marc/bibliographic/ecbdclas.html for specifics on which MARC field you should use. We have used MARC field 050 - Library of Congress Call Number - in this example (leave out leading zero).

Month List