This python tool allows the conversion from xml-files into rdf files, based on mhdbdb xml ontology. The tool can be used as a command line application or embedded as a module into python applications.
- xml to rdf: complete
- rdf to xml: not implemented yet
Recommended usage as a commandline tool. Setup python virtuel enviroment and install requirements.
If true convert xml to rdf. If false convert rdf to xml [currently not implemented!].
Options for xml to rdf conversion. Default:
{
"instanceNamespace":"https://dh.plus.ac.at/mhdbdb/text/",
"instanceNamespacePrefix":"mhdbdb",
"useDocNameAsXmlIdPrefix":true,
"ignoreWhitespace":true,
"xPathRoot":".//tei:text",
"generateSubClasses":true
}
- instanceNamespace: Namespace for the creation of new rdf instances
- instanceNamespacePrefix: Prefix for that namespace
- useDocNameAsXmlIdPrefix: If true, adds 'document_name#' as prefix to * xml:id from tree
- ignoreWhitespace: If true, ignores all whitespace text nodes
- xPathRoot: xPath to element, which should be used as root in conversion
- generateSubClasses: If true, generates rdfs subclasses for mhdbdbxml:Element for each parsed class of the xml document
Path to input directory
Path to output directory
If set, conversion starts with Filename (in ascending order)