Returns the element namespace string.
(element)
| 652 | |
| 653 | |
| 654 | def _get_namespace(element): |
| 655 | """Returns the element namespace string.""" |
| 656 | # The worldbody is treated as a member of the `body` namespace. |
| 657 | if element.tag == 'worldbody': |
| 658 | namespace = 'body' |
| 659 | else: |
| 660 | namespace = element.spec.namespace.split(constants.NAMESPACE_SEPARATOR)[0] |
| 661 | # Mocap bodies have distinct attributes so we use a dummy namespace for |
| 662 | # them. |
| 663 | if namespace == 'body' and element.mocap == 'true': |
| 664 | namespace = 'mocap_body' |
| 665 | return namespace |
no outgoing calls
no test coverage detected
searching dependent graphs…