namespace.py
Others:
Sets given namespace to given attribute.
Usage:
>>> setNamespace("parent", "child")
u'parent|child'
Parameters: | |
---|---|
Returns: | Namespaced attribute. |
Return type: | unicode |
Returns given attribute foundations.namespace.
Usage:
>>> getNamespace("grandParent|parent|child")
u'grandParent|parent'
>>> getNamespace("grandParent|parent|child", rootOnly=True)
u'grandParent'
Parameters: | |
---|---|
Returns: | Attribute foundations.namespace. |
Return type: | unicode |
Returns attribute with stripped foundations.namespace.
Usage:
>>> removeNamespace("grandParent|parent|child")
u'child'
>>> removeNamespace("grandParent|parent|child", rootOnly=True)
u'parent|child'
Parameters: | |
---|---|
Returns: | Attribute without foundations.namespace. |
Return type: | unicode |
Returns given attribute root.
Usage:
>>> getRoot("grandParent|parent|child")
u'grandParent'
Parameters: | |
---|---|
Returns: | Attribute foundations.namespace. |
Return type: | unicode |