get_namespace( node, prefix )
private
Returns a String namespace for a node, given a
prefix The rules are:
1. Use the supplied namespace mapping first.
2. If no mapping was supplied, use the context node to look up the namespace
Show source
def get_namespace( node, prefix )
if @namespaces
return @namespaces[prefix] || ''
else
return node.namespace( prefix ) if node.node_type == :element
return ''
end
end