namespace.py
Others:
This definition sets given namespace to given attribute.
Usage:
>>> setNamespace("parent", "child")
u'parent|child'
Parameters: |
|
---|---|
Returns: | Namespaced attribute. ( String ) |
This definition 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. ( String ) |
This definition 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. ( String ) |
This definition returns given attribute root.
Usage:
>>> getRoot("grandParent|parent|child")
u'grandParent'
Parameters: |
|
---|---|
Returns: | Attribute foundations.namespace. ( String ) |
This definition returns given attribute leaf.
Usage:
>>> getLeaf("grandParent|parent|child")
u'child'
Parameters: |
|
---|---|
Returns: | Attribute foundations.namespace. ( String ) |