XML Technologies: W3C Xforms Functionality In: Daniel Vogelheim Sun Microsystems, Inc

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

OOoCon 2004 - Berlin

XML Technologies:
W3C XForms Functionality in
OpenOffice.org

Daniel Vogelheim
Sun Microsystems, Inc.

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 1


W3C XForms in OpenOffice.org

About the Speaker


Daniel Vogelheim, Sun Microsystems
OpenOffice.org Developer since foundation
Areas Of Interest
Writer application core
XForms support
XML File Format & related technologies
Standards Activities
W3C XForms Working Group
OASIS Open Office TC

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 2


W3C XForms in OpenOffice.org
Agenda
Forms
Introduction to W3C XForms
W3C XForms in OpenOffice.org
Demo
Questions

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 3


Paper Forms
What is a Form?
fill-in-the-blanks doc.
layout + text to guide
users
structured data entry
Form Usage
common in business +
administration
established for decades
well understood by people

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 4


Electronic Forms
Electronic Forms
form controls
HTML Forms
data model: name/value pairs
submission + return document
everything else: scripting (client or server)
Database Forms
data model: SQL query
named columns + types
elementary data types + validation
load/store + navigation

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 5


Introduction to XForms
W3C XForms History
W3C XHTML needed better forms
spin-off separate working group
not only browsers anymore
XForms 1.0: W3C Recommendation – Oct '03
How is it different?
arbitrary XML data
bind controls through XPath expressions
supports dynamic forms ( = data-dependent)
declaratively add form logic
calculations, relevance, required

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 6


Example: Payment Terms
Example: Payment on Web Site
payment options
credit card, pre-paid
credit card: type, number expiration date
dependencies
credit card data REQUIRED for credit card payment
credit card data NOT RELEVANT for other payment
business logic!

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 7


Example: Payment Terms
<xforms:model>
<xforms:instance>
<payment>
<method>cash</method> <expiry/> <number/>
</payment>
</xforms:instance>
<xforms:bind id="bind_949f49c" nodeset="number"
relevant="../method = 'cc'"
required="../method = 'cc'"/>
<xforms:bind id="bind_710b52c" nodeset="expiry"
relevant="../method = 'cc'"
required="../method = 'cc'"/>
<xforms:bind nodeset="number" type="Credit Card"/>
<xforms:submission id="submit"
action="http://localhost:8888/" method="Post" />
</xforms:model>

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 8


XForms Implementations
Office Packages
StarOffice, OpenOffice.org & friends
Browsers
Mozilla (started)
XSmiles (XHTML + XForms browser)
plugins (FormsPlayer, Oracle)
Flash (Mozquito/SAP)
Server-Side
HTML + submit (Chiba (Java))
HTML + JavaScript (IBM)
Specialised Forms Packages
Daniel Vogelheim, Sun Microsystems, Inc. - Slide 9
Using Standards
No single product fits all
deploy over web
highly complex forms (e.g. tax declaration)
mobile use (e.g. mobile phones, hand-helds)
integration with business work-flow
... but XForms does!
It's about formats, not products!
up-size or down-size with new requirements
easy multi-channel deployment
How do we fit in?
OASIS format, established office functionality
between browser & specialised form solution
Daniel Vogelheim, Sun Microsystems, Inc. - Slide 10
XForms in OpenOffice.org
Previously in OpenOffice.org
HTML-style forms
database forms
New in OpenOffice.org 2.0
W3C XForms 1.0
create and deploy
XForms data model, OOo controls
support XSD data types, but not full XSD schema
embed XForms into OASIS Open Office format
also: improved database (not in this talk)

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 11


Creating XForms
Property Browser
edit control properties
bind control to XForms model
direct access to binding

Data Navigator
browse, edit instances
direct access to binding
edit submissions + bindings
Other
live preview for XPath

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 12


Using XForms
Filling Out a Form
only fillable content is editable
errors are clearly marked
comprehensible error messages
dynamic rebinding of controls

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 13


Other Use-Cases
Mixed XForms/Free-Form Documents
highly structured form-type information
plus conventional document body
use writable sections

Custom XML
allows embedding of arbitrary XML
edit/display custom XML with form controls
covers most common use-cases

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 14


Use-Case: Mixed Document
Specification
formal header
work-flow
embedded XForms
office body
headers, lists, images
OASIS Open Office
automate w/ XForms
check workflow rules
name/email lookup

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 15


Demo: Electronic Invoice
Electronic Invoice
use UBL (Universal Business Language)
data types
dependent calculations
sum, taxes, rebate
export as XHTML + Xforms
use in XSmiles

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 16


W3C XForms Functionality in
OpenOffice.org

Questions?

Daniel Vogelheim, Sun Microsystems, Inc. - Slide 17

You might also like