X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fconfig%2Fm.flt;fp=test%2Fconfig%2Fm.flt;h=883da344539993b235e199547e206fe4208d671a;hb=72fb813b56c42335985ef47d9d2a23ebc456eae0;hp=0000000000000000000000000000000000000000;hpb=5f196d5c2d38a50f3b986438fad5aa3c3a3f04c6;p=idzebra-moved-to-github.git diff --git a/test/config/m.flt b/test/config/m.flt new file mode 100644 index 0000000..883da34 --- /dev/null +++ b/test/config/m.flt @@ -0,0 +1,34 @@ +# +# DEF portal input filter +# + +// { begin record meta; set type ""; set AUTHOR ""; set PUBLISHER "" } +/<\/meta>/ { + data -element author-publisher "$AUTHOR XXX $PUBLISHER"; end record + } + + +// { + if {$scheme != ""} { set tag "$tag-s-$scheme" }; + if {$lang != ""} { set tag "$tag-l-$lang" }; + regsub -all {[\. -/:]} $tag "_" tag; + begin element $tag; + end context; + begin context content; + } + +/lang=\"/ BODY /\"/ { set lang $1 } + +/scheme=\"/ BODY /\"/ { set scheme $1 } + +CONTEXT {content} + +/<\/[aA]>/ { data $0 } + +/<\/[^>]*>/ { end element; end context } + +/./ { if {$tag == "dc_creator"} { append AUTHOR $0}; if {$tag == "dc_publisher"} { append PUBLISHER $0}; data $0 }