Register `cls` to be constructed when oxml parser encounters element having `nsptag_name`. `nsptag_name` is a string of the form `nspfx:tagroot`, e.g. `"w:document"`.
(nsptagname: str, cls: Type[BaseOxmlElement])
| 37 | |
| 38 | |
| 39 | def register_element_cls(nsptagname: str, cls: Type[BaseOxmlElement]): |
| 40 | """Register `cls` to be constructed when oxml parser encounters element having `nsptag_name`. |
| 41 | |
| 42 | `nsptag_name` is a string of the form `nspfx:tagroot`, e.g. `"w:document"`. |
| 43 | """ |
| 44 | nsptag = NamespacePrefixedTag(nsptagname) |
| 45 | namespace = element_class_lookup.get_namespace(nsptag.nsuri) |
| 46 | namespace[nsptag.local_part] = cls |
| 47 | |
| 48 | |
| 49 | from pptx.oxml.action import CT_Hyperlink # noqa: E402 |
searching dependent graphs…