Generating Forms Using One or More Transformation Rules
A computer-implemented method, computer program product, and system for generating a form may identify at least one form definition defining a form, where the form includes a form element having at least one value set by the form definition, apply at least one rule to the form definition, where the rule is associated with the form element; and adjust, based on the rule, the value of the form element in the form definition.
1 . A computer-implemented method for generating a form, the method comprising the following steps performed by one or more processors:
identifying at least one form definition defining a form, the form comprising a form element having at least one value set by the form definition;
applying at least one rule to the form definition, the rule associated with the form element; and
adjusting, based on the rule, the value of the form element in the form definition.
2 . The method of claim 1 , the form comprising a first form, adjusting, based on the rule, the value of the form element in the form definition comprises adjusting, based on the rule, the value of the form element in the form definition relative to a value of a corresponding form element in a second form.
3 . The method of claim 2 , where adjusting, based on the rule, the value of the form element in the form definition comprises adjusting at least one of:
a location of the form element within the first form relative to a location of the corresponding form element in the second form;
a font size of the form element within the first form relative to a font size of the corresponding form element in the second form; and
a font color of the form element within the first form relative to a location of the corresponding form element in the second form.
4 . The method of claim 1 further comprising sending the adjusted form definition and form element data associated with the form element to a rendering engine.
5 . The method of claim 4 further comprising:
receiving a new form comprising the form element having the adjusted value and the form element data from the rendering engine; and
graphically presenting the new form to a user.
6 . The method of claim 1 further comprising generating the rule based on at least one of:
a predetermined geographic locale; and
a type of the form template.
7 . The method of claim 1 , the rule stored in an XML document.
8 . The method of claim 1 , the form comprising at least one of:
a purchase order;
a delivery note;
an invoice;
a shipping notification; and
a mailing label.
9 . A computer program product for generating a form, the computer program product comprising computer readable instructions embodied on tangible media that are operable when executed to:
identify at least one form definition defining a form, the form comprising a form element having at least one value set by the form definition;
apply at least one rule to the form definition, the rule associated with the form element; and
adjust, based on the rule, the value of the form element in the form definition.
10 . The computer program product of claim 9 , the form comprising a first form, the instructions further operable to adjust, based on the rule, the value of the form element in the form definition relative to a value of a corresponding form element in a second form.
11 . The computer program product of claim 10 , the instructions further operable to adjust at least one of:
a location of the form element within the first form relative to a location of the corresponding form element in the second form;
a font size of the form element within the first form relative to a font size of the corresponding form element in the second form; and
a font color of the form element within the first form relative to a location of the corresponding form element in the second form.
12 . The computer program product of claim 9 , the instructions further operable to send the adjusted form definition and form element data associated with the form element to a rendering engine.
13 . The computer program product of claim 12 , the instructions further operable to:
receive a new form comprising the form element having the adjusted value and the form element data from the rendering engine; and
graphically present the new form to a user.
14 . The computer program product of claim 9 , the instructions further operable to generate the rule based on at least one of:
a predetermined geographic locale; and
a type of the form template.
15 . The computer program product of claim 9 , the rule stored in an XML document.
16 . The computer program product of claim 9 , the form comprising at least one of:
a purchase order;
a delivery note;
an invoice;
a shipping notification; and
a mailing label.
17 . A system for generating a form, comprising:
at least one memory storing:
at least one form transformation module;
at least one transformation rule; and
at least one form definition; and
one or more processors operable to execute the form transformation module, the module operable when executed to:
identify at least one form definition defining a form, the form comprising a form element having at least one value set by the form definition;
apply the transformation rule to the form definition, the rule associated with the form element; and
adjust, based on the rule, the value of the form element in the form definition.
18 . The system of claim 17 , the form comprising a first form, the form transformation module further operable to adjust, based on the rule, the value of the form element in the form definition relative to a value of a corresponding form element in a second form.
19 . The system of claim 18 , the form transformation module further operable to adjust at least one of:
a location of the form element within the first form relative to a location of the corresponding form element in the second form;
a font size of the form element within the first form relative to a font size of the corresponding form element in the second form; and
a font color of the form element within the first form relative to a location of the corresponding form element in the second form.
20 . The system of claim 17 , the system further comprising a rendering engine stored in the memory, the form transformation module further operable to:
send the adjusted form definition and form element data associated with the form element to the rendering engine;
receive a new form comprising the form element having the adjusted value and the form element data from the rendering engine; and
graphically present the new form to a user.
21 . The system of claim 17 , the form transformation module further operable to generate the rule based on at least one of:
a predetermined geographic locale; and
a type of the form template.
22 . The system of claim 17 , the form transformation module comprising a first form transformation module, the first form transformation module further operable to:
identify a first form structure of the form, the first form transformation module associated with a second form structure; and
identify, based on the first form structure, a second form transformation module associated with the first form structure, the second form transformation module operable when executed by the processor to:
identify at least one form definition defining the form, the form comprising a form element having at least one value set by the form definition;
apply the transformation rule to the form definition, the rule associated with the form element; and
adjust, based on the rule, the value of the form element in the form definition.