XML
  Home arrow XML arrow Page 2 - Sample Chapter: Early Adopter VoiceXML
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Sample Chapter: Early Adopter VoiceXML
By: Tim Pabst
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2002-09-04

    Table of Contents:
  • Sample Chapter: Early Adopter VoiceXML
  • VoiceXML With XSLT (HTML and WML)
  • System Architecture
  • System Architecture (contd.)
  • Generating MyRubberbandsML
  • Generating MyRubberbandsML (contd.)
  • Generating MyRubberbandsML (contd.)
  • Running the Stylesheet
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Sample Chapter: Early Adopter VoiceXML - VoiceXML With XSLT (HTML and WML)


    (Page 2 of 9 )

    This chapter examines the use of the Extensible Stylesheet Language for Transformations (XSLT) as a tool for the generation of VoiceXML. I intend to illustrate a complete, end-to-end example of implementing a voice interface for a client-server database via XML and XSL. The case study will demonstrate the power of XSL for simultaneously delivering multiple interfaces to the same data by developing HTML and WML front-ends also.

    Our case study takes us inside the rarified atmosphere of a fictional cash-strapped dot-com called MyRubberBands.com, purporting to be the "premier rubber bands site on the Internet". In the aftermath of the stock market meltdown, where our heroes saw their market valuation drop by over 95%, senior management, led by CEO Dr. Todd, has decreed that adding WML and voice functionality to the existing order status web site is do-or-die. MyRubberband's competitors have just rolled out their own WAP/voice access solution, and an all-out effort is necessary to catch up. Follow the programmers as they embark on their project to quickly roll out an equivalent capability.

    Our development team have decided to implement an XSLT-based solution to the problem. XSLT is an XML-based language for transforming input structured according to one XML vocabulary to structured output in another XML vocabulary, or some general text form.

    XSLT treats the document to be transformed as a set of nodes. An XSLT stylesheet defines a set of rules, or templates. When a template matches one of the nodes in the source document, the output structure given in the template is created in the transformed document. XSLT uses the W3C XPath specification language to query XML data. XPath is strongly analogous to SQL, and lets us specify complex rules to match nodes in a document.

    For a lot of applications, and for getting off to a quick start when processing XML, it is just the ticket – especially when you consider that XSLT is a relatively new technology so that processors should still have plenty of performance improvements possible. Use of an XSLT processor avoids the startup overhead of using a full parser API from a compiled language, making it more suited to dynamic web applications.

    MyRubberBands.com – A Case Study
    Our legacy database is implemented with MySQL, an open source client-server relational database management system. SQL code for the schema and a set of sample data is included in the code download for this book.

    An XML schema is used to represent an export of the legacy database instead of a Document Type Definition (DTD) because the schema standard is now complete, and increasing numbers of developers will be looking for the extra power schemas offer, especially as new development tools become available. An excellent primer on schemas is available from the W3C at http://www.w3.org/TR/xmlschema-0/.

    Scripts to export the database to XML format have been written using the Perl language, and the Data Base Interface (DBI) library. The Perl script shown was developed on Windows using Active State Perl, but should run on any platform, be it Windows or Unix. Many commercial databases, such as SQLServer 2000, are capable of exporting directly to XML, and so this step could be avoided entirely.

    Business Requirements
    With their competitors rolling out both voice and WAP access to services, MyRubberBands.com has no choice but to follow suit or lose market share in the cutthroat world of elastic band marketing. Due to market pressures, the new system must be up and running as soon as possible, and given this short development cycle, the requirements have been scaled back to providing simply voice and WAP access to a customer's order status data.

    However, some thought can still be given to the future. Rather than develop a quick and dirty "throwaway" voice interface, by putting in a little extra work now, the engineers can build a reusable infrastructure. By exporting their database to an XML format, they access the power of XSL to create VoiceXML and WML interfaces, and are able to transparently replace parts of the existing HTML site with dynamically created pages.

    More XML Articles
    More By Tim Pabst


     

    XML ARTICLES

    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway