$Id: README.xml,v 1.1 2002/08/20 23:16:55 rick Exp $
Tue Aug 20 03:15:27 EDT 2002
Table of Contents
xforms.xsl xforms to html template
xforms.css Example CSS styles for above output
test.xml Test input
README.xml source to this document
There are 3 defaults (xsl:params) in the template which control the formatting of lists and textareas. The parameters and their defaults are:
list-size 6
textarea-rows 5
textarea-cols 20
The stylesheet has been tested with the xsltproc command-line processor.
The template requires an xslt processor which supports the following exst extensions:
str:tokenize for handling multi-valued select instance data
dyn:evaluate for instance data
func:function for accessing model nodes and more.
The template attempts to handle as much of the Xforms RFC as possible w/o client side procesing or multi-pass transformations. Obviously, w/o client side processing things such as events, actions, control flow and interleaved model specific controls cannot be handled.
This version operates in xslt push mode. Any text or nodes (w/attributes) not in the xforms namespace are copied to the output as is. It handles multiple forms, but assumes that ALL the controls for each form are wrapped in an outermost xforms:group, in the same sense as binding elements are considered outermost in in section 7.3 of the xforms spec (that is, the xpath expression ancestor::xforms:group returns the null set).
It also assumes that the input contains all non xforms tags (e.g., html, head, body) required to generate a valid output document.
selectMany bindings are handled (I think) per the spec. That is, the instance data is assumed to be a space separated list of data.
Currently, nodeset attributes are assumed to be relative to xforms:instance (the root of the pseudo document as defined in the spec), as I cannot deduce from the spec whether they inherit outer context. If you want to bind a itemset to a relative reference, you can use a bind attribute. The bind element will be parsed as a relative path.
An xforms::group with the class attribute no-display can be used for context grouping and will not generate a 'div' element in the output. This is useful for generating instance context per section 7.3 of the spec without breaking e.g, a css table model. The template also ignores any caption, hint or common-attributes (class, accessKey) associated with the group.
Name attributes on the html form elements are generated according to the spec. That is, if the encoding is application/x-www-urlencoded, the name will be the local-name() of the data node. Any other encoding (default multipart-form-data) will be the xpath to the data.
mutiple models allowed. controls for each form must be contained in an outer group element. The model used will be either the first model in the document, or the model specified by the first element found via the xpath expression ancestor:xf:*[@model]. extensionFunctions are not supported.
supported
action supported
mediaTypeExtension supported
method supported
version not-supported
indent not-supported
encoding supported
mediaType not-supported
omitXMLDeclaration not-supported
standalone not-supported
CDATASectionElements not-supported
replace not-supported
xml:lang not supported
class supported
navIndex not supported
accessKey supported