
*/
public Document getProductXSL()
throws ServletException
{
if(null == productXSL)
{
Element productXSLElement =
XMLUtil.extractFirst(merchantElement,”stylesheet”);
if(null != productXSLElement)
{
String fname =
productXSLElement.getAttribute(“href”);
if(!XMLUtil.isEmpty(fname))
productXSL = XMLUtil.parse(fname);
}
}
return productXSL;
}
/**
* return a given product
* @param id product index
*/
public Product getProduct(String id)
throws ServletException
{
if(null == products ||
expire < System.currentTimeMillis())
{
Document productsDocument = getDocument();
if(null != productsDocument)
{
Element topLevel =
productsDocument.getDocumentElement();
Enumeration enumeration ...