October 28, 2016
Hot Topics:

Excerpt: Early Adopter VoiceXML: VoiceXML with XSLT (HTML and WML), Part 2

  • February 14, 2002
  • By Developer.com Staff
  • Send Email »
  • More Articles »

Wrox Press Book - Early Adopter VoiceXML Part 2
Chapter 7, VoiceXML with XSLT (HTML and WML)

WROX Press' New VoiceXML book This is the second half of Chapter 7, from WROX Press' upcoming book, Early Adopter VoiceXML. We'll continue where we left off last time, working through the myrubberbands example.

Finally, to provide the user with detailed order information, the full product name and description must be available. This will also allow the user to ask for a product list, and eventually we can perhaps extend the interface to enable products to be ordered by voice. Note that the <product_list> is not associated with any particular <customer_record>.

<order_history customer_id="1">      
<order id="1">          
address_type="Ship To Address" customer_id="1"/>          
<order_date sayas="May 18, 2001 at 16 17 hours"> 
<product id="1" quantity="3"/>          
<product id="3" quantity="1"/>      

Also note that, ideally, the <product_list> wouldn't actually be in the same document as the customer data. However, we'll keep everything in one file here to avoid the issue of linking between documents. It might amuse us to picture the harried developers reaching the same conclusion to save time and give themselves some chance of meeting their beloved boss's deadline. Later on, they will no doubt want to refine the process and generate smaller XML documents that can be processed more quickly.

<product id="1" name="MIXED1000" price="1.99">     
Mixed Bag of 1000 Rubber Bands
<product id="2" name="MIXED5000" price="4.09">     
Mixed Bag of 5000 Rubber Bands
<product id="3" name="RED1000" price="2.19">     
Bag of 1000 Red Rubber Bands
<product id="4" name="RED10000" price="17.49">     
Bag of 10000 Red Rubber Bands
<product id="5" name="BLUE1000" price="0.99">     
Bag of 1000 Blue Rubber Bands
<product id="6" name="BLUE10000" price="8.99">     
Bag of 10000 Blue Rubber Bands
This example is formatted to fit the space above, and for readability, adds quite a bit of whitespace between <product></product> tags that would probably not occur in a real document.

Page 1 of 5

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel