I have a variable ele. I'm trying to append a child node onto ele that contains a namespace prefix (called style) in its tag. ele seems to be aware of this prefix, as the line:
print(ele.nsmap['style'])
outputs
urn:oasis:names:tc:opendocument:xmlns:style:1.0
But when I try to run
ele.append(etree.fromstring('<style:style />'))
I get the error
lxml.etree.XMLSyntaxError: Namespace prefix style on style is not defined
What am I missing here?