X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=fml%2Fmarc.fml;h=26e2f4252045fbeeb5da43e96494d33ce52cb2d6;hb=477f50c9d787630be21ebe9ae137dd5515c71a87;hp=bb8679716089a5a8c2e0971169548a01a58fff1b;hpb=372b7a22555387ae193ed303132342e654319420;p=egate.git diff --git a/fml/marc.fml b/fml/marc.fml index bb86797..26e2f42 100644 --- a/fml/marc.fml +++ b/fml/marc.fml @@ -1,27 +1,35 @@ # Fml scripts to display MARC records -# $Id: marc.fml,v 1.1 1995/02/10 15:50:57 adam Exp $ -\func display rec { - Record\n +# $Id: marc.fml,v 1.5 1995/02/23 08:32:07 adam Exp $ +\func f0 rec { \foreach line {\rec} { \line \index 1 \ - \foreach field {\line \index 2} { - \field \index 1 - \ $\field \index 2 - \field \index 3 + \line \index 2 + \foreach field {\line \index 3} { + \if {\field \index 1} { + \ $\field \index 1\ + } + \field \index 2 } \n } } +\func mline prefix suffix lin tag subfield { + \if {{\strcmp {\line \index 1} \tag}\eq 0} { + \foreach field {\lin \index 3} { + \if {{\strcmp {\field \index 1} \subfield}\eq 0} { + \prefix + \field \index 2 + \suffix + } + } + } +} -\func f0 rec { +\func f1 rec { \foreach line {\rec} { - \line \index 1 \ - \line \index 2 \index 1 \index 1 - \foreach field {\line \index 2} { - \ $\field \index 2\ - \field \index 3 - } - \n + \mline 'Title: ' '\n' \line 245 a + \mline 'Author: ' {} \line 100 a + \mline ', ' '\n' \line 100 h } }