class XmlTagStyles:
	def __init__(self):
		self.__classes = []
		self.__rules = dict()

	def add_class(self, names):
		names_list = names.split(" ")
		for name in names_list:
			self.__classes.append(name)

	def add_rule(self, k, v):
		self.__rules[k] = v
	def get_rules(self):
		return self.__rules
	
	def get_class(self):
		if len(self.__classes) == 0:
			return None
			
		names = ""
		for i in range(len(self.__classes)):
			names += self.__classes[i]
			if i < len(self.__classes) - 1:
				names += ' '
		return names

	def get_rules_css(self):
		html = ""
		for k in self.__rules:
			v = rule[k]
			html += k + ": " + v + "; "

		return html

	def has_rules(self):
		return len(self.__rules) > 0
	def has_classes(self):
		return len(self.__classes) > 0