def SplitAttr(attr):
	"""Takes a fully-scoped attributed and returns a tuple of the
	(scope, attr).  If there is no scope it returns (None, attr).
	"""

	s = ''
	a = ''

	if attr:
		if attr.find('/') >= 0:
			tokens = attr.split('/')
		else:
			tokens = attr.rsplit('.', 1)
		if len(tokens) == 1:
			a = attr
		else:
			if tokens[1]:
				s = tokens[0]
				a = tokens[1]
			else:
				s = tokens[0]

	return (s, a)