transformators submodule¶
This module is used to transform Marc XML from Aleph to MODS. MODS is defined by XSLT templates.
-
marcxml2mods.transformators.
_absolute_template_path
(fn)¶ Return absolute path for filename from local
xslt/
directory.Parameters: fn (str) – Filename. MARC21slim2MODS3-4-NDK.xsl
for example.Returns: Absolute path to fn in xslt
dicretory..Return type: str
-
marcxml2mods.transformators.
_apply_postprocessing
(xml, func, uuid)¶ Apply func to all
<mods:mods>
tags from xml. Insert UUID.Parameters: Returns: List of string with postprocessed XML.
Return type:
-
marcxml2mods.transformators.
transform_to_mods_mono
(marc_xml, uuid)¶ Convert marc_xml to MODS data format.
Parameters: Returns: Collection of transformed xml strings.
Return type:
-
marcxml2mods.transformators.
transform_to_mods_multimono
(marc_xml, uuid)¶ Convert marc_xml to multimonograph MODS data format.
Parameters: Returns: Collection of transformed xml strings.
Return type:
-
marcxml2mods.transformators.
transform_to_mods_periodical
(marc_xml, uuid)¶ Convert marc_xml to periodical MODS data format.
Parameters: Returns: Collection of transformed xml strings.
Return type:
-
marcxml2mods.transformators.
marcxml2mods
(marc_xml, uuid)¶ Convert marc_xml to MODS. Decide type of the record and what template to use (monograph, multi-monograph, periodical).
Parameters: Returns: Collection of transformed xml strings.
Return type: