XHTML, XForms, XML Events - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

XHTML, XForms, XML Events

Description:

Title: PowerPoint Presentation Last modified by: Marc Abrams Created Date: 1/1/1601 12:00:00 AM Document presentation format: On-screen Show Other titles – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 15
Provided by: coursesC7
Category:

less

Transcript and Presenter's Notes

Title: XHTML, XForms, XML Events


1
XHTML, XForms, XML Events Device Independence
  • Based on W3C Specs as of April 2002
  • Marc Abrams
  • Abrams_at_vt.edu

2
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

3
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. HTMLs
    simple namevalue pairs)
  • XForms Model to describe structure of XML
    Instance Data
  • Separate data, logic and presentation

4
Relation of XForms Components
Diagram from W3C http//www.w3.org/MarkUp/Forms/
arch1.png
5
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
  • ExamplePurpose find students in a
    coursePresentation form with list of course
    sData chosen course number

6
Old style HTML Form
  • ltform action"http//example.com/submit"
    method"post"gt
  • ltlabelgt
  • ltinput type"radio" name"as"
    value"cash"/gt Cash
  • lt/labelgt
  • lt/formgt

7
XForms Example (1)
  • ltxformsmodelgt
  • ltxformssubmitInfo action"http//examples.com/
    submit" id"submit"/gt
  • lt/xformsmodelgt

8
XForms Example (2)
  • ltinput ref"cc"gt
  • ltcaptiongtCredit Card Numberlt/captiongt
  • lt/inputgt
  • ltsubmit submitInfo"submit"gt
  • ltcaptiongtSubmitlt/captiongt
  • lt/submitgt

9
Data Submitted by Browser
  • Hey, its XML, not that weird http//?x123!
  • ltinstanceDatagt
  • ltasgtCreditlt/asgt
  • ltccgt1235467789012345lt/ccgt
  • lt/instanceDatagt

10
Instance Data Is Described by Model
  • ltxformsmodelgt
  • ltxformsinstancegt
  • ltpayment as"credit" xmlns"http//commerce.ex
    ample.com/payment"gt
  • ltcc/gt
  • lt/paymentgt
  • lt/xformsinstancegt
  • ltxformssubmitInfo action"http//example.com/su
    bmit" method"post"/gt
  • lt/xformsmodelgt

11
XML Events
  • Motivation
  • HTML does this
  • ltimg onMouseOver document.images.button1.src'c
    lick.gifgt
  • Problems
  • Must change HTML to add new event names
  • Mixes event handling into document content

12
XML Events - Example
  • lta id"link1" href"doc.html"gtThe ltemgtdraftlt/emgt
    documentlt/agt
  • ltlistener event"click" observer"para1"
    target"link1" handler"clicker"/gt
  • You can attach listeners to any XML tree node.

13
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

14
References
  • XML Events(http//www.w3.org/TR/2001/WD-xml-event
    s-20011026/)
  • XForms - The Next Generation of Web Forms
    (http//www.w3.org/MarkUp/Forms/)
  • XHTML Roadmap(http//www.w3.org/MarkUp/xhtml-road
    map/)
Write a Comment
User Comments (0)
About PowerShow.com