CIS 375—Web App Dev II XForms
2 Introduction to XForms XForms are the next generation of HTML forms are richer and more flexible than HTML forms are designed to handle interactive transactions are platform and device _____________ separate data and logic from presentation use ______ to define forms and transport data contain features like calculations and validations of forms can be routed to multiple users and locations XForms 1.0 became a W3C _______________ in October 2003, but implementation is not widespread. Here’s an online book covering XForms.online book
3 HTML Form Example Select Payment Method Cash Credit Card Card Number: Expiration Date:
4 XForms Example <example xml:lang="en" xmlns:xforms=" Select Payment Method: Cash cash Credit cc Credit Card Number: Expiration Date: Submit
5 A Novell Implementation
6 XForms Example Implemented
7 Comments About XForms More complicated, but more functional and device independent. Notice the following about the markup example: The user interface is not hard-coded to use radio buttons Form controls always have _______ There is no need for an enclosing form element The data will be submitted as _____: cc
8 XForms Data Types & FunctionsData Types Functions The XForms specification contains many predefined data types, such as xs:string A string (this is the default datatype ) xs:date Defines a date value xs:time Defines a time value xs:decimal Defines a decimal value XForms have some predefined functions (but you can also call functions defined in _______), such as boolean-from-string(string) if(booleantest, string1, string2) avg(node-set) days-from-date(string)