namespace.py
Others:
This definition sets given namespace to given attribute.
Usage:
>>> setNamespace("parent", "child")
'parent|child'
Parameters: |
|
---|---|
Returns: | Namespaced attribute. ( String ) |
This definition returns given attribute namespace.
Usage:
>>> getNamespace("grandParent|parent|child")
'grandParent|parent'
>>> getNamespace("grandParent|parent|child", rootOnly=True)
'grandParent'
Parameters: |
|
---|---|
Returns: | Attribute namespace. ( String ) |
This definition returns attribute with stripped namespace.
Usage:
>>> removeNamespace("grandParent|parent|child")
'child'
>>> removeNamespace("grandParent|parent|child", rootOnly=True)
'parent|child'
Parameters: |
|
---|---|
Returns: | Attribute without namespace. ( String ) |
This definition returns given attribute root.
Usage:
>>> getNamespace("grandParent|parent|child")
'grandParent|parent'
>>> getNamespace("grandParent|parent|child", rootOnly=True)
'grandParent'
Parameters: |
|
---|---|
Returns: | Attribute namespace. ( String ) |
This definition returns given attribute leaf.
Usage:
>>> getNamespace("grandParent|parent|child")
'grandParent|parent'
>>> getNamespace("grandParent|parent|child", rootOnly=True)
'grandParent'
Parameters: |
|
---|---|
Returns: | Attribute namespace. ( String ) |