Chapter 14: Building an XML-Powered Web Site
Throughout this book, we have presented the wide range of Oracle products that have become XML-enabled, and we have introduced many of the XML standards. In this chapter, we will explore the development and deployment of a real-world application that uses these standards with the Oracle XDK and the new XML features of Oracle Database 10g. In this application, we explore the important capabilities of XSLT, the XSQL Servlet, the XML SQL Utility, Oracle Text, and the XML data types and operators in Oracle Database 10g.
An XML-Enabled FAQ Web Site
A frequent requirement for companies that maintain a web presence is to have a support area for their products. This area may range from simple electronic versions of their owner’s manuals to a moderated discussion forum. A popular support area feature is to have an FAQ (frequently asked questions) section for each product.Visitors to the site will be able to see all the FAQ subject areas on the home page and can also search and select from the most frequently viewed FAQs. Whenever the list of FAQs appears, users can see the answers as well as find related FAQs by following the presented links. Inside each FAQ answer are links to an online glossary for technical or special terms. This functionality will be described in detail later in the chapter.As you no doubt have realized, the Oracle XML-enabled products and components are quite extensive and include components in the quite disparate programming languages of C, C++, PL/SQL, and Java. However, underneath they all provide XML functionality that is programming-language independent. This gives rise to an awkward model for providing technical support, because many questions that are XML-based are equally applicable across all the XDKs, yet there are many language-specific questions that only make sense in only one XDK. Therefore, providing an Oracle XML FAQ site that can store all questions within a database and designing the schema in a way that FAQs can be tagged as relevant for one or more of the languages as well as the XML-enabled database features is a basic requirement for this site.Besides simply displaying a listing of FAQs per XML component and feature, users would expect a full text search facility. Since we plan to store the FAQs in the Oracle XML database, we can take advantage of Oracle Text (formerly interMedia Text) search engine with its XML support. We also need a mechanism for submitting FAQs, which can be provided by FTP access to the Oracle XML DB repository.In most cases, the content for web sites is delivered from HTML pages stored in file systems on servers. For this application, we will deliver as much of the content as possible from the database. This will give us maximum manageability of the content while at the same time demonstrating most of the Oracle XML database functionality.