2 # Input-filter for the Nordic Web Index record syntax. Output is 'gils-like'.
6 /<nwi>/ { begin record gils }
12 /<ti> */ BODY /$/ { data -element title $1 }
14 /<dm> */ BODY /$/ { data -element dateOfLastModification $1 }
16 /<ci> */ BODY /$/ { data -element controlIdentifier $1 }
18 /<si>/ { begin element supplementalInformation }
19 /<lc> */ BODY /$/ { data -element lastChecked $1 }
20 /<by> */ BODY /$/ { data -element bytes $1 }
22 /<av>/ { begin element availability }
23 /<avli> */ BODY /$/ { data -element linkage $1 }
24 /<ty> */ BODY /$/ { data -element linkageType $1 }
26 /<lsi>/ { begin element localSubjectIndex }
27 /<dh> */ BODY /$/ { data -element localSubjectTerm $1 }
29 # Don't want to have <ip> inside of LocalSubjectIndex
30 # Since we end localsubjectindex, we consume the end-tag for that as well.
32 #/<ip>[ \n]*/ BODY /<\/ip>[ \n]*<\/lsi>/ {
34 # data -element sampleText $1
37 /<ip>[ \n]*/ BODY /<\/ip>/ {
39 data -element sampleText $1
42 /<cr>/ { begin element crossReference }
43 /<li> */ BODY /$/ { data -element linkage $1 }
44 /<cp> */ BODY /$/ { data -element title $1 }
46 /<\/nwi>/ { end record }
50 /<\/[^>]*>/ { end element }