'Given an etree xml element that should have this attribute, do the obvious thing:
- look for it.  raise ValueError if not found and required.
- transform and validate.  pass through any exceptions from transform or validate.'

def parse_from_xml(self, element):

    val = element.get(self.name)
    if ((self.default == self._sentinel) and (val is None)):
        raise ValueError('Missing    required    attribute    {0}.'.format(self.name))
    if (val is None):
        return self.default
    if (self.transform is not None):
        val = self.transform(val)
    if (self.validate is not None):
        self.validate(val)
    return val
