login about faq

As of February 2015 Libcatcode is no longer accepting new questions. This site will stay up as the owner decides the next steps for preserving the content on the site. Thank you all for your support in the past three years!

Are there some X-Path like expressions available for MARC that are less verbose than MARCXML-ish expressions:


or mere prose

  245 $a with ind2 is 0
  740 $a$h if ind2 is not 2

I'm writing some tools that need mapping rules that can be easily checked by metadata specialists and parsed by computers.

asked Feb 07 '12 at 01:02

hochstenbach's gravatar image


The SolrMarc IndexProperties are similar to what you are describing. It allows for statements like the following:

published_text = 260a
material_type_text = 300a
notes_text = 500a:505a
uniform_title_text = 240a:240b
uniform_title_display = 240a

You might also want to check out the marcspec Ruby library that Bill Dueber at the University of Michigan has put together.


answered Feb 09 '12 at 20:10

Ted's gravatar image


Thanks! Great to see all the little DSL-s popping up. We are trying to so something along the same lines in the Catmandu project.

(Feb 10 '12 at 01:06) hochstenbach

marcspec is pretty tied to marc4j4r at this point, which may or may not be a problem. I'd be interested in speccing out a simple 'marc-query' that could be implemented across all the major MARC libraries (Perl, Python, Ruby, Java), if folks are thinking about this sort of thing.


answered Feb 13 '12 at 11:15

BillDueber's gravatar image


I would be very interested in trying to work out some examples in Perl

(Feb 15 '12 at 10:36) hochstenbach

It's still in dev, but I'm working on a util for our Blacklight instance that has a config similar to, but different from, SolrMaRC. It is written in Python. https://github.com/pulibrary/MaRC2Solr


answered Mar 06 '13 at 07:59

jpstroop's gravatar image


Have you looked at pymarc? Its syntax is Pythonic -- that is, spare but expressive.


answered Jul 08 '13 at 15:11

Dorothea%20Salo's gravatar image

Dorothea Salo

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Feb 07 '12 at 01:02

Seen: 4,637 times

Last updated: Jul 08 '13 at 15:11

Powered by hamsters in the server | CSS skin by prtk