<s> USAGE = """<STR_LIT>""" <EOL> import sys <EOL> from os . path import join , dirname <EOL> from lxml import etree <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if len ( sys . argv ) < <NUM_LIT:2> : <EOL> print USAGE <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> xmlfile = sys . argv [ <NUM_LIT:1> ] <EOL> doc = etree . parse ( file ( xmlfile ) ) <EOL> xsdfile = join ( dirname ( __file__ ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> xsd = etree . XMLSchema ( etree . parse ( file ( xsdfile ) ) ) <EOL> xsd . assertValid ( doc ) </s>
