@validate('form')
def valid_att_in_label(arch):
 return (not arch.xpath('//label[not(@for or @string)]'))

@ validate ( 'form' ) def valid_att_in_label ( arch ) : return ( not arch . xpath ( '//label[not(@for or @string)]' ) )
label nodes must have a @for or a @string .