2006-01-27 | paulb | file changeset files shortlog | [project @ 2006-01-27 00:44:13 by paulb] Changed the extraction script to use the original template. Added reference and parameter support to the output script. |
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@488 | 14 | print "Please specify a template, an output filename and a template node identifier." |
paulb@205 | 15 | print "For example:" |
paulb@488 | 16 | print "xslform_extract.py template.xhtml output_element.xsl identifier" |
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 |