qn is short for *qualified name*. Return fully qualified (Clark notation) tagname corresponding to short-form prefixed tagname *tag*.
(tag)
| 36 | return '%s:%s' % (prefix, tagroot) |
| 37 | |
| 38 | def qn(tag): |
| 39 | """ |
| 40 | qn is short for *qualified name*. Return fully qualified (Clark notation) |
| 41 | tagname corresponding to short-form prefixed tagname *tag*. |
| 42 | """ |
| 43 | prefix, tagroot = tag.split(':') |
| 44 | uri = nsmap[prefix] |
| 45 | return '{%s}%s' % (uri, tagroot) |
| 46 | |
| 47 | def new(tag, **extra): |
| 48 | return Element(qn(tag), **extra) |
no test coverage detected