2007-09-08 | paulb | file changeset files shortlog | [project @ 2007-09-08 16:21:49 by paulb] Added Ubuntu Feisty packaging files. |
paulb@246 | 1 | #!/usr/bin/env python |
paulb@246 | 2 | |
paulb@246 | 3 | "Prepare an input stylesheet." |
paulb@246 | 4 | |
paulb@246 | 5 | import XSLForms.Prepare |
paulb@246 | 6 | import sys |
paulb@246 | 7 | |
paulb@246 | 8 | if __name__ == "__main__": |
paulb@246 | 9 | try: |
paulb@246 | 10 | input_xml = sys.argv[1] |
paulb@246 | 11 | output_xml = sys.argv[2] |
paulb@246 | 12 | except IndexError: |
paulb@246 | 13 | print "Please specify a template and an output filename." |
paulb@363 | 14 | print "To suppress the initialisation of enumerations, specify --noenum last." |
paulb@246 | 15 | print "For example:" |
paulb@363 | 16 | print "xslform_input.py template.xhtml output.xsl --noenum" |
paulb@246 | 17 | sys.exit(1) |
paulb@246 | 18 | |
paulb@363 | 19 | XSLForms.Prepare.make_input_stylesheet(input_xml, output_xml, "--noenum" not in sys.argv) |
paulb@246 | 20 | |
paulb@246 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |