Now that we've retrieved the information, we still need to massage it. We need to add extended prices based on quantity for each item, as well as a final total price. To do that, we must get the results of the first transformation as a document, instead of just the output text. Therefore, we need to make some changes to both the servlet and the style sheet. Listing 6.28 shows the changes to ReviewOrder.java.
... 106: Node productRoot = products.getFirstChild(); 107: processNode(productRoot, out, orderSystem, newDoc, 108: "http://www.nicholaschase.com/products/", "prod:"); 109: 110: TransformerFactory transFactory = 111: TransformerFactory.newInstance(); ...