Python XML processing with lxml

16.2. rnck: main()

rnck

# - - - - - m a i n
def main():
"""Validate one or more files against an RNC schema.
[ if (command line arguments are valid) ->
if (.rnc and .rng are readable, valid, and up to date) and
(all FILE arguments are valid against that .rng) ->
I
else (if .rnc is readable and valid and .rng can be updated
from the .rnc) and
(all FILE arguments are valid against that .rng) ->
the .rng file := an RNG version of the .rnc
else ->
sys.stderr +:= error message
else ->
sys.stderr +:= error message ]
"""

Processing of the arguments is handled in Section 16.3, “rnck: checkArgs()”. We get back two items: the
path to the schema, and a list of XML file names to be
validated.