Return a new ` ` element. `target_ref` is either a partname or a URI.
(
cls, rId: str, reltype: str, target_ref: str, target_mode: str = RTM.INTERNAL
)
| 106 | |
| 107 | @classmethod |
| 108 | def new( |
| 109 | cls, rId: str, reltype: str, target_ref: str, target_mode: str = RTM.INTERNAL |
| 110 | ) -> CT_Relationship: |
| 111 | """Return a new `<Relationship>` element. |
| 112 | |
| 113 | `target_ref` is either a partname or a URI. |
| 114 | """ |
| 115 | relationship = cast(CT_Relationship, parse_xml(f'<Relationship xmlns="{nsmap["pr"]}"/>')) |
| 116 | relationship.rId = rId |
| 117 | relationship.reltype = reltype |
| 118 | relationship.target_ref = target_ref |
| 119 | relationship.targetMode = target_mode |
| 120 | return relationship |
| 121 | |
| 122 | |
| 123 | class CT_Relationships(BaseOxmlElement): |
nothing calls this directly
no test coverage detected