|
FormSIX Version 1.0
FormSIX (Form Simple Interface in XML) package is
a set of tools and suggestions for interchanging simple HTML FORM data between Web Browser and Web Server
in XML format.
For a bigger purpose, FormSIX aids replacing/extending regular CGI with XML by
providing client-side JS modules for composing valid XML document.
For a smaller purpose, FormSIX helps testing out Internet system design by providing
a tool for generating front-end prototype even to a not-yet XML enabled back-end.
(FormSIX can even be used to generate Web-based interface to SOAP service.)
In fact, the author finds FormSIX pretty handy when it comes to designing DTD.
The FormSIX package includes:
- a set of client-side JavaScript modules for composing the data entered into the form as an XML document
- a set of client-side JavaScript modules for parsing "initializing" XML document, and setting up the form by setting the data to the form
- and a development-time tool for automatically generating HTML/JavaScript code from the XML DTD that describes the form
FormSIX also includes some little suggestings on how to interchanging XML documents using the existing
Web Browser/Server supports.
Here is a simple sample:
|
Input DTD
|
Output FORM
|
<!ELEMENT person (name)>
<!ATTLIST person sex (M|F) #REQUIRED>
<!ELEMENT name (first-name,last-name)>
<!ELEMENT first-name (#PCDATA)>
<!ELEMENT last-name (#PCDATA)>
|
|
In the simplest case, the DTD is the only required input.
For a more sophisticated output, a configuration file -- f6 file -- can be provided to fine turn the many aspects of
the generation process.
Hope you enjoy the FormSIX package.
Please e-mail any problems, bug reports, comments and suggestions to Trevor Lee.
Once a defect is discovered, the author shall try his best to resolve the problem and make
the solution available as soon as possible.
... download FormSIX ...
The followings are the features of FormSIX:
-
Generation of Web Form HTML code either statically or dynamically.
Included is a set of custom JSP tags for dynamic Web Form generation.
-
Generation of JS Code for Web form data validation.
Currently, most validation rules are specified using the f6 configuration file.
In the future, FormSiX may be enhanced to extract validation rules from XML Schema.
-
Generation of JS Code to compose XML document from Web form data.
-
Generation of JS Code to parse XML document and initialize the form accordingly.
-
Generation of XML Schema Definition (XSD) for form validation by validating XML parser.
-
Support different levels of customizations to control the look of the generated HTML code.
-
Using different CSS theme for the look - coloring - of the form.
-
Using the order directive to control the layout order of the elements.
-
Using different "layout-templates" for composing the layout of the form.
-
Using "page-template" to wrap the form with any HTML constructs.
-
Using "page-template" to completely control the look of the whole page.
Support different levels of customizations to control the flow of the generated JS code.
-
Customization of form data validation.
-
Customization of error reporting.
-
Customization of XML document submission mechanism.
-
Support some DHTML effects for show/hide optional sections.
-
Support of an expression language to add another level of flexibility to the form generation processes:
-
All parameters/directives specified in the f6 file can be an expression.
-
The expression language allows adding "page-template" preprocessing markups to include/exclude sections of HTML code at generation time.
To get you started with this pretty feature-rich and flexible Web form generation
package, a
"get-started" document is provided.
For a more detailed description of the package, please refer to the "User Guide"
included in the package.
Additionally, the package includes a few
samples
and
web-samples
to show you how the different
features can be used.
Here are three sample HTML pages generated using the same
DTD and
f6 file.
The only difference was the parameters
passed to the generator.
Starting from version 0.56, "page-template" is supported.
Here is a DEMO SEARCH PAGE sample search
page that shows how the page -- the surrounding and the layout of the form -- can be customized.
The page is generated from the
DTD,
the
f6 file, and the
page template.
Additionally, the SAVING CALCULATOR sample
should show some of the more advanced customization mechanisms added starting from version 0.9.
Although the sample is mostly for demonstration, it is nonetheless a pretty neat tiny little
client-side application.
For more details about the sample, please take a look at the file
what_it_does.html.
History:
-
Jan 2, 2003. Version 1.0 released.
Download ...
-
July 13, 2002. Version 0.995 released.
-
Added list type.
-
Added bypassValidate parameter to bypass client-side validation.
-
Added Date type to f6 expression.
-
June 10, 2002. Version 0.99 released.
-
May 11, 2002. Version 0.96 released.
-
Added external parameter entity support.
-
Adding Java TagLib.
-
Sep 10, 2001. Version 0.95 released.
-
Removed the directive password. Instead, the new
directive fieldUI is used for specifying that the
file should be a password field. In fact, the new fieldUI
allows you to specify that a field is used for getting filename from
the user.
-
Added needDataSet parameter to always include the
FormSIX Data Set JS modules to be used by custom JS code.
-
Added needSAXParser parameter to always include the simple SAX Parser for parsing XML Document in custom JS code.
-
Added f6p:variable and f6p:function "page-template" markups.
-
Added f6p:file "page-template" markups to enable inclusion of "page-template" segments defined some other file.
-
Aug 15, 2001. Version 0.942 released.
- Added a SOAP sample which shows how FormSIX can be used to create simple UI for placing SOAP request.
-
Jul 11, 2001. Version 0.941 released.
- Added generation of more advanced "page template" f6p file.
-
Jul 1, 2001. Version 0.94 released.
- Added VIM -- VI Improved -- syntax file for f6 file.
- Renamed directive output to mode.
- Added generation of basic "page-template" f6p file.
- Added generation of XSD -- XML Schema Definition -- for validation.
- Added to f6 file the new element include.
- Added align-nested "layout-template".
-
Jun 19, 2001. Version 0.931 released.
-
Finished adding f6 Expression -- which is similar to XPath Expression -- give
add another level of flexibility to the FormSIX package.
-
Added preprocess f6p markups, which is used for specifying on generation
time which parts of a template should be included and which parts should be excluded.
-
Added User-defined sections to f6 file, which is used for defining functions
and variables.
-
Removed the behavior directive maxChildGroupRepeat; instead, a new
way of specifying directives for subgroup is devised.
-
Jun 3, 2001. Version 0.93 released.
-
Adding f6 Expression -- which is similar to XPath Expression -- give
add another level of flexibility to the FormSIX package.
-
Added what directive to direct the FormSIX generator to
generate other kind of outputs -- like sample f6 files -- using
similar approach as generating Web form.
-
Added order directive to enable reording layout of subelements of a
complex element.
-
May 7, 2001. Version 0.921 released.
- Renamed the directive cssScheme to cssTheme.
-
April 5, 2001. Version 0.92 released.
-
Added heavy-simple, heavy-simple2 and light-nested layout templates.
-
Please note that light-nested layout template replaced the original look of nested layout template.
-
Change parameter cssSuffix to cssScheme.
-
Changed parameter errMsgManSuffix to errMsgManLang.
-
Added CSS scheme of the look of the form.
-
Added promptUse parameter.
-
Added new "comment encoding" of parameters and/or directives.
-
Added new syntax for specifying directives in f6 file.
-
March 18, 2001. Version 0.91 released.
- Choice groups are now treaded much like element group when layout.
In other words, choice groups are indented if the "nested" template is used.
In fact, the new subgroupTemplate specifies the template to use for child choice groups.
- Add rootElement parameter.
- Added preferred directive.
-
March 5, 2001. Version 0.9 released.
- Added JS customization mechanism.
- Added autoCheck, cssFile, errMsgManFile, customJSFile, submitTarget and wellFormed parameters.
- Added maxRepeat, collapsible and inputAttribute directives.
- Added f6p:lang, f6p:submit-js-call and f6p:reset-js-call page-template substitute markups.
- Added time and timeInstant type.
- Changed the behavior directives.
- Changed the parameter errManSuffix to errMsgManSuffic.
- Removed the original form layouting support.
- Removed dateSeparated parameter.
-
February 5, 2001. Version 0.56 released.
- Added new "subsitute" page template markups.
- Added finer "component" page template markups for customizing the form.
- Added submitEncType parameter.
-
January 5, 2001. Version 0.55 released.
- Adjusted the form layout strategy to use templates.
- Added page template support.
- Improved the directive bag merging algorithm.
- Added dateSeparated parameter.
-
December 5, 2000. Version 0.54 released.
- Added directives noLayout, hideIfReadOnly and noIndent.
- Added class promptText.
- Added <parameter> element to f6 XML file support.
-
Changed the meaning of the behavior directive maxRepeat; the original feature is now
provided by the new childMaxRepeat behavior directive instead.
-
The value of the bag attribute can specify multiple bag names separated by a pipe (|) like:
<directives bag="@unit|@accuracy">...</directives>
-
October 27, 2000. Version 0.53 released.
- Added f6 XML file support. This is an external file used to specify directives to use for the
different elements/attributes of the DTD file.
-
Relaxed the DTD restriction concerning "choices" so that choice groups can be repeated like:
E.g., <!ELEMENT elem (a,b,(c|d|e)*,f)>
- Added directives maxRepeat, splitThreshold and noRepeatedTitle.
-
October 4, 2000. Version 0.52 released.
- Added SplitThreshold and NoRepeatedTitle global directives.
-
Relaxed the DTD restriction concerning "choices" so that
choices of element can be specified within an "element group."
E.g., <!ELEMENT elem (a,b,(c|d|e),f)>
-
Added a JSP Web application sample.
-
September 17, 2000. Version 0.51 released.
- Added Simplified Chinese "error reporter" JS module.
- Added input/output encoding parameters.
- Added password directive.
- Changed form layout a bit.
-
September 10, 2000. Version 0.5 released.
Download: FormSIX_v1.zip (595K).
After you downloaded the ZIP file, unzip it to any directory, say in the same directory of your (development) Web site.
The ZIP file already specifies the suggested directory to use for this FormSIX package.
In the package, several sample DOS Command Line BATCH files show you how to invoke the generator to
generate HTML/Javascript code from the sample DTD files. A DOS command to invoke the generator looks something like:
java -cp lib/form6.jar form6.Generate -testing=true -f6=member.f6 member.dtd member.html
FormSIX package is free for both development and production use.
The package can be redistributed for non-profit purposes, provided that the complete
package is redistributed unaltered.
The author shall retain the rights to the source and the binary of the software package.
This software package does not come with any warranty, or support of any kind.
The author is not responsible for any damage caused due to the use of this software package.
Bug reports, comments and suggestions are welcome.
Trevor Lee, Wing Sang
E-mail: trev_lee@hotmail.com
Home Page: http://www.geocities.com/tlhome2000/
TLHome
Other Software
| |