2 # DEF portal input filter
5 /<meta>/ { begin record meta; set type ""; set AUTHOR ""; set PUBLISHER "" }
7 data -element author-publisher "$AUTHOR XXX $PUBLISHER"; end record
11 /</ /[A-Za-z0-9._:]*/ { puts "tag:$1"; set tag $1; set scheme ""; set lang ""; begin context attributes }
16 if {$scheme != ""} { set tag "$tag-s-$scheme" };
17 if {$lang != ""} { set tag "$tag-l-$lang" };
18 regsub -all {[\. -/:]} $tag "_" tag;
21 begin context content;
24 /lang=\"/ BODY /\"/ { set lang $1 }
26 /scheme=\"/ BODY /\"/ { set scheme $1 }
30 /<\/[aA]>/ { data $0 }
32 /<\/[^>]*>/ { end element; end context }
34 /./ { if {$tag == "dc_creator"} { append AUTHOR $0}; if {$tag == "dc_publisher"} { append PUBLISHER $0}; data $0 }