2005-08-18 | paulb | file changeset files shortlog | [project @ 2005-08-18 15:58:09 by paulb] Moved XSLOutput and XMLTable into a new XSLTools package. Renamed the scripts. |
paulb@205 | 1 | #!/usr/bin/env python |
paulb@205 | 2 | |
paulb@205 | 3 | "Prepare a templating stylesheet fragment." |
paulb@205 | 4 | |
paulb@205 | 5 | import XSLForms.Prepare |
paulb@205 | 6 | import sys |
paulb@205 | 7 | |
paulb@205 | 8 | if __name__ == "__main__": |
paulb@205 | 9 | try: |
paulb@205 | 10 | input_xml = sys.argv[1] |
paulb@205 | 11 | output_xml = sys.argv[2] |
paulb@205 | 12 | element_id = sys.argv[3] |
paulb@205 | 13 | except IndexError: |
paulb@205 | 14 | print "Please specify an output template, an output filename and an element identifier." |
paulb@205 | 15 | print "For example:" |
paulb@205 | 16 | print "extract.py output.xsl output_element.xsl element" |
paulb@205 | 17 | sys.exit(1) |
paulb@205 | 18 | |
paulb@205 | 19 | XSLForms.Prepare.make_stylesheet_fragment(input_xml, output_xml, element_id) |
paulb@205 | 20 | |
paulb@205 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |