I have to create this node following this model https://gitlab.com/crossref/schema/-/blob/master/examples/journal_article_4.4.2.xml:
<jats:abstract>The abstract
</jats:abstract>
I already set the namespaces:
MY_NAMESPACES={'xsi': 'http://www.w3.org/2001/XMLSchema-instance', None: 'http://www.crossref.org/schema/4.4.2', 'jats': 'http://www.ncbi.nlm.nih.gov/JATS1', 'fr': 'http://www.crossref.org/fundref.xsd'}
attr_xsi = etree.QName("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation")
root = etree.Element('doi_batch', {attr_xsi: "http://www.crossref.org/schema/4.4.2 https://www.crossref.org/schemas/crossref4.4.2.xsd"}, nsmap=MY_NAMESPACES, version="4.4.2")
But I don't know how to call the jats namespace from that. Following this example Create XML files which have tags with prefix (python and lxml) I created this:
jats = "http://jats.nlm.nih.gov" #https://jats.nlm.nih.gov/archiving/tag-library/1.3d1/chapter/app-notes-namespace.html
jats_namespace = {"jats": jats}
abstract = etree.SubElement(article, "{" + jats + "}" + "abstract").text = "the abstract"
But what I get is
<ns0:abstract xmlns:ns0="http://jats.nlm.nih.gov">the abstract</ns0:abstract>
I know this is wrong, but how can I call the jats namespace set before?