XSLTools

scripts/xslform_extract.py

349:83ce900fe957
2005-10-25 paulb [project @ 2005-10-25 17:27:39 by paulb] Moved generic methods from the QtConfigurator example into a new resource class in the PyQt module. Moved the Factory class from the QtConfigurator example into the PyQt module.
     1 #!/usr/bin/env python     2      3 "Prepare a templating stylesheet fragment."     4      5 import XSLForms.Prepare     6 import sys     7      8 if __name__ == "__main__":     9     try:    10         input_xml = sys.argv[1]    11         output_xml = sys.argv[2]    12         element_id = sys.argv[3]    13     except IndexError:    14         print "Please specify an output template, an output filename and an element identifier."    15         print "For example:"    16         print "xslform_extract.py output.xsl output_element.xsl element"    17         sys.exit(1)    18     19     XSLForms.Prepare.make_stylesheet_fragment(input_xml, output_xml, element_id)    20     21 # vim: tabstop=4 expandtab shiftwidth=4