2009-03-21 | Paul Boddie | raw annotate files changeset graph | Added support for file uploads, employing a special list of files as part of the forms dictionary, and using a file namespace in order to provide special attributes which refer to entries in the files list. Extended the candidate example to support picture uploads. |
1 #!/usr/bin/env python 2 3 "Fix a template document's namespaces." 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 except IndexError: 13 print "Please specify template input and result filenames." 14 print "For example:" 15 print "xslform_fix.py template.xhtml template_new.xhtml" 16 sys.exit(1) 17 18 XSLForms.Prepare.fix_namespaces(input_xml, output_xml) 19 20 # vim: tabstop=4 expandtab shiftwidth=4