You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
To have complete transformation definitions in one file, it might make sense to support (rudimentary) embedded transformation rules in Flux files within the Metafacture IDE, e.g.:
files + "input.xml" | open-file | decode-xml | read-marcxml |
morph {
/* simple rule: just transform the key: */
"8564 .u" -> "http://lobid.org/vocab/lobid#fulltextOnline";
/* transform key and value, using the regexp function: */
"260 .c" -> "http://purl.org/dc/terms/medium/issued" {
regexp.match("(1\d{3}|200\d)").format("${1}");
// e.g. "07.04.1873[nach dem 07.04.1873]" -> "1873"
}
} | encode-ntriples | write(output + "output.nt");
Based on the morph block representation parsed by Xtext, we could generate the corresponding morph.xml file with Xtend, replace the morph block with a reference to the morph.xml, and pass the result to Flux.
We might also be able to generate some test.xml for the transformation (verify the simple key transformation, or even make comments like // e.g. "07.04.1873[nach dem 07.04.1873]" -> "1873"; part of the grammar and convert them into test cases).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
To have complete transformation definitions in one file, it might make sense to support (rudimentary) embedded transformation rules in Flux files within the Metafacture IDE, e.g.:
Based on the morph block representation parsed by Xtext, we could generate the corresponding morph.xml file with Xtend, replace the morph block with a reference to the morph.xml, and pass the result to Flux.
We might also be able to generate some test.xml for the transformation (verify the simple key transformation, or even make comments like
// e.g. "07.04.1873[nach dem 07.04.1873]" -> "1873";
part of the grammar and convert them into test cases).The text was updated successfully, but these errors were encountered: