(self, prefix_root)
| 342 | return self._cached_root |
| 343 | |
| 344 | def prefixed_identifier(self, prefix_root): |
| 345 | if not self._spec.identifier and not self._is_worldbody: |
| 346 | return None |
| 347 | elif self._is_worldbody: |
| 348 | prefix = self.namescope.full_prefix(prefix_root=prefix_root) |
| 349 | return prefix or 'world' |
| 350 | else: |
| 351 | full_identifier = ( |
| 352 | self._attributes[self._spec.identifier].to_xml_string( |
| 353 | prefix_root=prefix_root)) |
| 354 | if full_identifier: |
| 355 | return full_identifier |
| 356 | else: |
| 357 | prefix = self.namescope.full_prefix(prefix_root=prefix_root) |
| 358 | prefix = prefix or constants.PREFIX_SEPARATOR |
| 359 | return prefix + self._default_identifier |
| 360 | |
| 361 | @property |
| 362 | def full_identifier(self): |
no test coverage detected