def xslt_transformation(xml, template):
    """
    Transform `xml` using XSLT `template`.

    Args:
        xml (str): Filename or XML string. Don't use ``\\n`` in case of
                   filename.
        template (str): Filename or XML string. Don't use ``\\n`` in case of
                        filename.

    Returns:
        str: Transformed `xml` as string.
    """
    transformer = ET.XSLT(
        _read_template(template)
    )
    newdom = transformer(
        _read_marcxml(xml)
    )

    return ET.tostring(newdom, pretty_print=True, encoding="utf-8")