2 # Input-filter for the Nordic Web Index record syntax. Output is 'gils-like'.
4 # $Id: nwi.flt,v 1.4 1996-06-11 10:53:56 quinn Exp $
7 /<nwi>/ { begin record gils }
13 /<ti> */ BODY /$/ { data -element title $1 }
15 /<dm> */ BODY /$/ { data -element dateOfLastModification $1 }
17 /<ci> */ BODY /$/ { data -element controlIdentifier $1 }
19 /<si>/ { begin element supplementalInformation }
20 /<lc> */ BODY /$/ { data -element lastChecked $1 }
21 /<by> */ BODY /$/ { data -element bytes $1 }
23 /<av>/ { begin element availability }
24 /<avli> */ BODY /$/ { data -element linkage $1 }
25 /<ty> */ BODY /$/ { data -element linkageType $1 }
27 /<lsi>/ { begin element localSubjectIndex }
28 /<dh> */ BODY /$/ { data -element localSubjectTerm $1 }
30 # Don't want to have <ip> inside of LocalSubjectIndex
31 # Since we end localsubjectindex, we consume the end-tag for that as well.
33 #/<ip>[ \n]*/ BODY /<\/ip>[ \n]*<\/lsi>/ {
35 # data -element sampleText $1
38 /<ip>[ \n]*/ BODY /<\/ip>/ {
40 data -element sampleText $1
43 /<cr>/ { begin element crossReference }
44 /<li> */ BODY /$/ { data -element linkage $1 }
45 /<cp> */ BODY /$/ { data -element title $1 }
47 /<\/nwi>/ { end record }
51 /<\/[^>]*>/ { end element }