XForms 1.2 Modularization
Overview
The Data Layer Specifications
The Data Island Module
The Data Binding Attributes Module
The Data Accessors Module (setvalue, insert, delete)
The Submission Module
The XPath Functions Modules
The Model Layer Specifications
The Model Container Module
The Model Item Property Binding Module
The Validation Module (constraint, required, type, datatypes)
The XML Schema Validation Module
The Relevant Module
The Readonly Module
The Calculate Module
The User Interface Layer Specifications
The Form Controls module
The Input Form Controls (input, textarea, select1, select, range, ...)
The Output Form Control module
The trigger control and submit control modules
The Container Form Controls Modules (group, switch, repeat)
The Label , Hint , Help , Alert , and Message Modules
The XForms Module
More Detailed
Specifications for Data Layer
The Data Island module - Charlie
- Create instance element that provides data separately from the document
- instance element may have id attribute and may have child element
- Function for getInstanceDocument()
- Function for replaceInstanceDocument()
- Function to load instance, which dispatches event data-instance-load, cancelable and bubbles, the default processing of which loads the instance.
- Optional to implement src and resource attributes are added to the instance element
The "Data Binding Attributes" module - John
- Defines notion of inscope evaluation context
- Current default for outermost SNB or NSB is an instance data island, but should be defined generically so that consuming profile defines the root
- Create instance attribute with IDREF content to set starting instance, default to instance from starting inscope evaluation context
- Defines the Single Node Binding attribute group
- Defines the Nodeset Binding attribute group
- Put ref in SNB group
- Put nodeset in the NSB group
- Put context in SNB and NSB groups
- Add instance() function, included in the extension functions group
- Add two parameter id() function, included in the extension functions group
- Add context() function, included in the extension functions group
- This module needs to be able to answer the following questions:
- What is the initial inscope eval context of this element?
- What is the amended inscope eval context of this element?
- What is the result of the SNB or NSB?
- Was there an expresssed SNB or NSB (as opposed to the result being equal to the amended context)?
- Defines notion of inscope evaluation context
The Data Accessors module - Charlie
- Defines setvalue with SNB
- Defines insert with NSB
- Defines delete with NSB
- Defines xforms-insert and xforms-delete
- Current default is an instance data island, but should be targeted at a location defined by the consuming profile
- Adds setvalue, insert, delete to Actions group
The submission Module - Uli and John
Includes Need event for submission result received event
- xforms-submit, xforms-submit-done, xforms-submit-error, xforms-submit-serialize
- submission element and attributes
- submission module attributes: Common, resource, action, mode, method, serialization, version, indent, mediatype, encoding, omit-xml-declaration, standalone, cdata-section-elements, separator, includenamespaceprefixes
- XForms driver module would define attributes ref, bind, validate, relevant, replace, target, instance
- submission module child elements: header, method, resource, Actions element group
- submission module: send action element, load action element
Specifications for XPath Functions - John
- Define an extension functions group, identify by a URI for purpose of unique naming only
- Define that a host language can optionally import the extension functions group into the XPath function library as NCName functions
- Data Integrity functions module, included in the extension functions group
- Date and Time functions module, included in the extension functions group
- Conditional functions module, included in the extension functions group
- Math functions module, included in the extension functions group
The Model Layer Specifications
Model module (model element, functions attr, model events, add @model to SNB and NSB bindings)
- Defines model element as a container
- Define model content group, initially to contain zero or more instances; other modules able to add to the model content group
- The model provides scope limiting behavior to binding attributes and instance() function invocations in its subtree
- Defer the @functions attribute because it seems to be the small part of the notion of mustunderstand, which has been removed
- The property() function
- Adds @ model to SNB and NSB groups
- Define the reset action and initial instance storage
- Define a change list management facility (by listening for text data mutations, which may come from setvalue, calculate, or external DOM access)
The bind Module Nick
- Define the bind element
- Add bind element to model content group
- Add @bind to SNB and NSB attribute groups
- Change from nodeset attr to Node Set Binding attributes
- Note that this adds context attribute to the bind element, which is good
- The context attribute changes context for other attributes but does not, in and of itself, change the node to which MIPS are applied (e.g. if no nodeset is expressed)
- Note that a containing model restricts instance attribute to within itself
- Note that a containing model restricts model attr to be itself
- If a bind element has a bind attribute, then the bind element is ignored
Define rebuild action and xforms-rebuild event for model element (if we move xforms-rebuild event to model module this allows us not to refer the model module (it can use the rebuild action ))
- Need to define the generic MIP decoration mechanism
- Allow attributes but also a child element called property
- The property element should have name and calculable value attributes
- For static property values, use property element content
Property is re-evaluated on when rebuild action is called
Appendix that shows how infoset contributions should be implemented when using DOM
The calculate Module (calculate) John
- Define recalculate action and xforms-recalculate event for model
- Add master dependency graph notion to rebuild
- Consumer of change list from model module
- Attributes constraint, required, type (for datatype only)
The Core XForms Typelib Module (adds the 'must' datatypes in xsd and xforms namespaces)
- Define revalidate action and xforms-revalidate event for model element
The XML Schema Validation Module
- schema attr on model
- inline schema
- xsi:type
- full schema validation
- ability to refer to schema-defined datatypes in type
The relevant Module (relevant)
The readonly Module (readonly)
- This module needs to say that conformant implementations will not allow performing of mutations on readonly nodes (according to the rules XForms currently defines)
- This affects getInstanceDocument() so that it returns a DOM whose methods respect non-mutability of readonly nodes
- This affects the setvalue, insert and delete data accessors
- This affects submission instance replacement
The p3ptype Module (p3ptype) MarkB and Paul
The User Interface Layer specifications
The Form Controls module
- Defines the setfocus action
- Define the refresh action and the xforms-refresh event for model elements
- Define UI binding as extending from Single Node Binding to get behaviors of MIPs and notification events (xforms-valid, xforms-invalid, xforms-value-changed, etc.)
- Consumer of change list from model module
- This module allows custom form controls to use UI bindings
Input Form Controls module (input, textarea, select1, select, range, upload, ...)
Output Form Control module - Keith
The trigger control module - Keith
The submit control module - Keith
- Container Form Controls
- The group module
- The switch module
- Includes the toggle action
The Repeat Module
- repeat element
- setindex action
- Augment definition of references and dependencies based on index changes
The repeat attributes Module
The Label module
The Hint Module
The Help Module
The Alert Module
The Message Module - MarkB
The XForms Module - Steven
- Pull together various modules into a package
- Data Instance module
- XPath extension functions library module
- Actions module based on XML Events 2
- Data Accessors module
- Binding attributes
- The model and bind modules
- calculate, relevant, readonly
- Core validation module (constraint, required, type, core typelib)
- XML Schema validation module
- The submission module
- The UI module, UI binding attributes module
- The input controls module
- The output module
- The label module
- The container controls modules (group, switch and repeat modules)
- The message, hint, help, and alert modules
- Provide composition-level semantics for the modules
- Define binding attributes context based on instances
- Ability to use NCNames to invoke functions of the XPath extensions library
- Add label as required to various input controls and optional on other form controls (e.g. trigger, output, group)
- Add help, hint, alert to various form controls
- Define driver-level processing model
- Define xforms-model-construct, xforms-model-construct-done, xforms-ready, xforms-model-destruct
- Based on XML Events 2 as Actions module
- XForms defines an enhanced evaluation context for if and while
- Deferred update concept contributed to Actions module
- Pull together various modules into a package