
Dear all, I have to generate XML files that contain snippets like this one, but I can't find a way to produce a "xml:base" attribute: <markList xmlns:xlink="http://www.w3.org/1999/xlink" type="tok" xml:base="maz-1423.text.xml"> <mark id="sTok1" xlink:href="#xpointer(string-range(//body,'',1,3))" /> <mark id="sTok2" xlink:href="#xpointer(string-range(//body,'',5,10))" /> </markList> I tried to setup the namespaces, but instead of "xml:base", I'll only get "ns0:base". NSMAP={None: 'xml', 'xlink': 'http://www.w3.org/1999/xlink', 'xml': 'xml'} E = ElementMaker(nsmap=NSMAP) etree.tostring(E("markList", {'type': 'tok', '{%s}base' % NSMAP['xml']: 'maz-1423.text.xml'})) '<markList xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="xml" xmlns:ns0="xml" ns0:base="maz-1423.text.xml" type="tok"/>' I'd appreciate any help with this. Best regards, Arne Neumann