XHTML, XForms, XML Events & Device Independence Based on W3C Specs as of April 2002 Marc Abrams
XHTML Overview XHTML 1:Put HTML4.01 into XML syntax XHTML 1.1:Modularize XHTML for “resource constrained devices” DOM-2 support: Attach event handlers to XHTML elements via XML Events
XForms Goals Provide richer Web forms Multiple forms per page, and pages per form Provide form processing model: Forms Submit Protocol Suspend and Resume support Provide forms on various devices Seamless integration with other XML tag sets (XHTML, WML, …) Relies on XML model of form data (vs. HTML’s simple name=value pairs) XForms Model to describe structure of XML Instance Data Separate data, logic and presentation
Relation of XForms Components Diagram from W3C:
Usage Scenario Underlying XForms Web designer starts with a purpose (e.g., data collection) Purpose is realized by interactive presentation (a form) Completion of form produces data Example: Purpose=find # students in a course Presentation =form with list of course #s Data=chosen course number
Old style HTML Form Cash …
XForms Example (1)
XForms Example (2) Credit Card Number Submit
Data Submitted by Browser Hey, it’s XML, not that weird Credit
Instance Data Is Described by Model
XML Events Motivation: HTML does this: Problems: Must change HTML to add new event names Mixes event handling into document content
XML Events - Example The draft document … You can attach listeners to any XML tree node.
Conclusion XHTML is modular, but not truly device independent XForms is device independent, but only provides a form metaphor They are limited to XML languages (not Java, C++) So these are steps toward general device independence, but not a full solution
References XML Events ( XForms - The Next Generation of Web Forms ( XHTML Roadmap (