def setVersion(template, version):
 for node in domhelpers.findElementsWithAttribute(template, 'class', 'version'):
  text = dom.Text()
  text.data = version
  node.appendChild(text)

def setVersion ( template , version ) : for node in domhelpers . findElementsWithAttribute ( template , 'class' , 'version' ) : text = dom . Text ( ) text . data = version node . appendChild ( text )
add a version indicator to the given template .