AppFormInputXsl
From UGP-Wiki
Documentation on appForm file: app_form_input.xsl
Contents |
[edit] Purpose of app_form_input.xsl
- app_form_input.xsl is one the three required files for any appForm application
- app_form_input.xsl translates the user input provided by appForm into a valid program input file
- The user input is provided by appForm in an xml file named "fn.xml", where fn is as specified by the user.
- The program input file is written as "fn.txt", where fn is as specified by the user).
- NOTE: replace app in the file name with the name of the application as it appears in the UGP Application table.
[edit] Tips on How to Construct Your File
Writing the app_form_input.xsl is more complex than writing the corresponding XML files. This file is not written using standard elements and widgets, rather it uses XSL processing functions and requires custom algorithms written by the programmer that will differ according to the style and complexity of the input file required for the program.
For example, in bbeps2_form_input.xsl the bbeps2 application requires as its input file requires an unordered fortran namelist of parameters. Therefore the value of each parameter is written to the input file by bbeps2_form_input.xsl in no particular order.
On the other hand, Q-Chem Q-Chem_form_input.xsl requires a formatted input file with parameters that belong to specific sections (Sample Q-Chem Input File. The Q-Chem XML files were also more complex and contained widgets that were used solely for formatting and not for inputting parameters (e.g. checkboxes that control the display of groups). Therefore, in Q-Chem_form_input.xsl, elements had to be filtered out, processed in a particular order and written to the input file in specific sections.
The easiest way to write an app_form_input.xsl file is to start with .xsl file for an application whose input file is similar to the one you need to create in style and then modify if for your needs.
[edit] Format of User-Input from jobname.xml
For a full example: Sample fn.xml file
- The user input from appForm is saved in an xml file of the format:
<?xml version="1.0" ?>
<app name='appName'>
<element name="element_id">
<value>element_value</value>
</element>
</app>
- appName is the application name, for example Q-Chem.
- app_form_input.xsl is then able to process the input file using XSL processing functions.
appForm also includes in every jobname.xml file an element that has as its value the name chosen by the user when saving the input file. It is formatted as follows:
<element name="filename"> <value>filename</value> </element>

