Web Forms

Objective

Build a "simple" forms-oriented business application that generates printed reports.
Two levels of data forms fill-in template for a printed report which is presently a Word document.  
Contents of forms control which data may appear in some forms.
Contents of forms control the layout of the report as well as fill-in fields.

Criteria

Alternatives

Chosen Design

XML Schema

http://www.w3.org/TR/xmlschema-0/
http://www.w3.org/TR/xmlschema-1/
http://www.w3.org/TR/xmlschema-2/

 XML Schema Part 0 (local link)
XML Schema Part 1 Structures (local)
XML Schema Part 2 Datatypes (local copy)

The purpose of XML Schema: Structures is to define the nature of XML schemas and their component parts, provide an inventory of XML markup constructs with which to represent schemas, and define the application of schemas to XML documents.

The purpose of an XML Schema: Structures schema is to define and describe a class of XML documents by using schema components to constrain and document the meaning, usage and relationships of their constituent parts: datatypes, elements and their content and attributes and their values. Schemas may also provide for the specification of additional document information, such as normalization and defaulting of attribute and element values. Schemas have facilities for self-documentation. Thus, XML Schema: Structures can be used to define, describe and catalogue XML vocabularies for classes of XML documents.

The Schema

Castor

Castor is an open source data binding framework for Java[tm]. It's basically the shortest path between Java objects, XML documents and SQL tables. Castor provides Java to XML binding, Java to SQL persistence, and then some more.

Castor docs (local copy)
Source Generator type mapping

The Generated JavaBeans

Help Needed for JavaBeans

XQuery

Qexo (local copy)

JavaBeans Helper Script

Helper Generator Script

Cocoon 2 XMLForm

Cocoon

Cocoon User Documentation

XML Form from XML Schema

XSL

The Extensible Stylesheet Language (XSL) is a language for expressing stylesheets. It consists of two parts:

  1. a language for transforming XML documents (XSLT), and

  2. an XML vocabulary for specifying formatting semantics (XSL-FO).

An XSL stylesheet specifies the presentation of a class of XML documents by describing how an instance of the class is transformed into an XML document that uses the formatting vocabulary.

Many of the formatting attributes in XSL-FO are in common with CSS2.  That enables the possibility of having some automatic translation of XSL to CSS.  That would be very useful in publishing XHTML documents in both screen-oriented and printed forms.

XSL Overview (local copy)

XSLT

XPath

XSL-FO

XSL Overview (local copy)

FOP docs (local copy)

Rich XSL Example

Hammer XML
FOP Tests

Lessons Learned

W3C XForms

XForms is an XML application that represents the next generation of forms for the Web. By splitting traditional XHTML forms into three parts—XForms model, instance data, and user interface—it separates presentation from content, allows reuse, gives strong typing—reducing the number of round-trips to the server, as well as offering device independence and a reduced need for scripting.

XForms is not a free-standing document type, but is intended to be integrated into other markup languages, such as XHTML or SVG.

XForms (local copy)

Future Possibilities