O'Reilly logo

XML and Java™ from scratch by Nicholas Chase

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Collecting Payment Information

Now, we need to give the user a place to enter his or her credit-card information. Listing 6.38 shows the changes to the style sheet to add a form.

Listing 6.38. ConfirmOrder.xsl: Adding a Form
0: <?xml version="1.0"?>
1: <xsl:stylesheet version="1.0"
2:         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3:         xmlns:prod="http://www.nicholaschase.com/products/"
4:         xmlns:ord="http://www.nicholaschase.com/orders/">
5:
6: <xsl:include href="topinclude.xsl"/>
7:
8: <xsl:template match="tempDoc">
9:     <h2>Confirm Order</h2>
10:    <form action="CompleteOrder" method="get"> 11: <table> 12: <tr> 13: <th>Product ID</th> 14: <th>Manufacturer</th> 15: <th>Description</th> 16: <th>Price</th> 17: <th>Quantity</th> 18: <th>Total Cost</th> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required