Manage Learn to apply best practices and optimize your operations.

Manage user input with XForms

What XForms can do for you.


XML Developer Tip
(Receive this column in your inbox,
click Edit your Profile to subscribe.)

Manage user input with XForms
Ed Tittel

The comment period on the latest working draft of the W3C's XForms 1.0 recommendation is over, so it's just a matter of time now before XForms is finalized and this work becomes available for developers to use in soliciting user input within XML documents. This is great news, because XForms offers a much more straightforward and powerful way to handle user input than the combination of forms-related HTML markup and related JavaScript or other controls used on typical Web pages today. For a look at the latest official information on XForms, please visit www.w3.org/MarkUp/Forms/.

That said, some understanding of how XForms actually works is probably worth providing. A simple bulleted list is all that it takes to tick off the high points:

  • XForms works in concert with XPath to navigate XML source documents
  • XForms also works in concert with XSLT to process forms processing and related instructions
  • XForms includes markup to manage both large and small amounts of input (<input> and <textarea>), to control entry of confidential or private data (<secret>), to manage display of document contents (aka "instance data"; <output>), to handle value selections from a range of inputs (<range>), to upload files or device data (<upload>), to incorporate form events (<trigger>), to submit form data for server-side processing (<submit>), and to select values from a set of one or more legal options (<select1> and <select>).
  • XForms also supports a variety of input modes, to support all kinds of user input, not just from the keyboard but also from telephone keypads or other input devices.
  • XForms uses the XML event model to manage user interaction (for more information on this fascinating subject, see the XML Events page at www.w3.org/TR/xml-events/). These permit managing user focus, display of user messages, navigating within existing or new windows, changing instance data, forcing recalculation, revalidation, or screen refreshes, partial or complete submission of input data, and other display management functions.

When all these facilities are combined, content developers have direct access to all the functions that typically required scripting in the more limited HTML implementation.

This new outlook on managing user input and interaction in XML documents promises to make it much easier and more straightforward for content developers to build and manage dynamic XML documents. Even better, this approach promises to reduce if not eliminate the browser dependencies that have plagued earlier HTML-based implementations—as soon as the majority of Web browsers become fully XML-enabled that is. In the meantime, it's worth taking the time to get to know and learn how to use this powerful new specification, which should help reduce a major cause of Web chaos. Happy XML coding!

For more information on this topic, please check out Micah Dubinko's excellent story "What are XForms" at XML.com at www.xml.com/pub/a/2001/09/05/xforms.html.


About the Author

Ed Tittel is a principal at LANWrights, Inc., a network-oriented writing, training, and consulting firm based in Austin, Texas. He is the creator of the Exam Cram series and has worked on over 30 certification-related books on Microsoft, Novell, and Sun related topics. Ed teaches in the Certified Webmaster Program at Austin Community College and consults. He a member of the NetWorld + Interop faculty, where he specializes in Windows 2000 related courses and presentations.


For More Information:

  • Looking for free research? Browse our comprehensive White Papers section by topic, author or keyword.
  • Are you tired of technospeak? The Web Services Advisor column uses plain talk without the hype.
  • For insightful opinion and commentary from today's industry leaders, read our Guest Commentary columns.
  • Hey Codeheads! Start benefiting from other time-saving XML Developer Tips and .NET Developer Tips.
  • Visit our huge Best Web Links for Web Services collection for the freshest editor-selected resources.
  • Choking on the alphabet soup of industry acronyms? Visit our helpful Glossary for the latest lingo.
  • Visit Ask the Experts for answers to your Web services, SOAP, WSDL, XML, .NET, Java and EAI questions.
  • Discuss this issue, voice your opinion or just talk with your peers in the SearchWebServices Discussion Forums.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close