Return string containing relative reference to package item from `baseURI`. E.g. PackURI("/ppt/slideLayouts/slideLayout1.xml") would return "../slideLayouts/slideLayout1.xml" for baseURI "/ppt/slides".
(self, baseURI: str)
| 84 | return self[1:] |
| 85 | |
| 86 | def relative_ref(self, baseURI: str) -> str: |
| 87 | """Return string containing relative reference to package item from `baseURI`. |
| 88 | |
| 89 | E.g. PackURI("/ppt/slideLayouts/slideLayout1.xml") would return |
| 90 | "../slideLayouts/slideLayout1.xml" for baseURI "/ppt/slides". |
| 91 | """ |
| 92 | # workaround for posixpath bug in 2.6, doesn't generate correct |
| 93 | # relative path when `start` (second) parameter is root ("/") |
| 94 | return self[1:] if baseURI == "/" else posixpath.relpath(self, baseURI) |
| 95 | |
| 96 | @property |
| 97 | def rels_uri(self) -> PackURI: |
no outgoing calls