Revision 4239
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xml_func.py | ||
---|---|---|
66 | 66 |
|
67 | 67 |
##### Public functions |
68 | 68 |
|
69 |
var_name_prefix = '$' |
|
70 |
|
|
71 |
def is_var_name(str_): return str_.startswith(var_name_prefix) |
|
72 |
|
|
73 |
def is_var(node): |
|
74 |
return xml_dom.is_text_node(node) and is_var_name(xml_dom.value(node)) |
|
75 |
|
|
69 | 76 |
def is_func_name(name): |
70 | 77 |
return name.startswith('_') and name != '_' # '_' is default root node name |
71 | 78 |
|
Also available in: Unified diff
xml_func.py: Added is_var_name() and is_var()