O'Reilly logo

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

XML and Java™ from scratch

Book Description

With the help of XML and Java from scratch, you will build a Web site and application for ChaseWeb Furniture-a fictitious catalog furniture company. All of the information on products, prices, vendors, and so on, is rendered in XML. You'll learn how to display products on the company Web site, take orders, produce a paper catalog, and communicate with the external databases of vendors using XML. The from scratch format is designed to teach novice programmers the hows and whys of programming in the context of creating a functioning application.

Table of Contents

  1. Copyright
  2. Foreword
  3. Acknowledgments
  4. About the Author
  5. Tell Us What You Think!
  6. Introduction
  7. Vendor Pages: Styling XML with Cascading Style Sheets
    1. Walking Before We Run: HTML and XHTML
    2. Controlling Presentation: Cascading Style Sheets
    3. Delving Deeper into CSS2
    4. Converting Our Content to XML
    5. Next Steps
  8. Product Pages: Transforming XML in the Browser Using XSL
    1. The Two Faces of XSL: XSL Transformations and XSL Formatting Objects
    2. Getting Ready
    3. Trees: The Basic Structure of XML
    4. Well-Formedness
    5. Building the Style Sheet
    6. Templates
    7. Getting Specific—Using XPath
    8. Looping and Sorting
    9. Adding Elements and Attributes
    10. Conditionals
    11. Next Steps
  9. Defining the Data Structure: Document Type Definitions, XML Schema, and Parsers
    1. Introducing Java
    2. Installing the Java 2 Software Development Kit
    3. Installing the Xerces-J Parser
    4. Well-Formed Versus Valid Documents
    5. Document Type Definitions
    6. External DTDs
    7. Referential Integrity
    8. XML Schema
    9. Next Steps
  10. Getting Serious: XSL Processors and Server-Side Processing
    1. XSL Processors
    2. Xalan
    3. Converting a File from the Command Line
    4. Advanced XSLT: Includes and Imports
    5. Java Basics
    6. Reading a File from a Java Application
    7. Transforming an XML File from Within a Java Program
    8. Advanced XSLT: Parameters
    9. Our First DOM: Stepping Through Our XML
    10. Automating Further: Adding Next and Previous Links
    11. Adding a Web Server to the Mix
    12. Installing and Configuring Tomcat
    13. The First Servlet
    14. Extracting Request Information
    15. Next Steps
  11. Taking Orders: Manipulating Data with JDOM
    1. What Is JDOM?
    2. Installing JDOM
    3. Developing an Algorithm
    4. Creating the Shopping Cart—AddToOrder.java
    5. Manipulating an XSL Style Sheet
    6. Next Steps
  12. Adjusting Inventory: Using Namespaces and More About DOM
    1. Manipulating In-Memory Documents
    2. The Structure of a DOM Document
    3. Adding Nodes to a Document
    4. Serializing the Document
    5. Adding Namespaces
    6. Retrieving Namespace Information
    7. Creating the Review Page
    8. Working with the Results of the Transformation
    9. Working with Our Temporary Document
    10. The Final Style Sheet
    11. Collecting Payment Information
    12. Accepting Payment Information
    13. Next Steps
  13. Product Search: XQL
    1. Downloading the GMD-IPSI XQL Engine
    2. Creating the Index File
    3. Creating the Search Page
    4. The Search Results Page
    5. Performing the Search
    6. Next Steps
  14. Updating Inventory: SQL Databases and SAX
    1. Connecting to the Database: JDBC, ODBC, and SQL
    2. Creating the Inventory Database
    3. Creating the Initial Inventory
    4. Introduction to SAX: Adjusting Inventory
    5. Using SAX to Parse the File
    6. Updating the Database
    7. Retrieving Information from the Database: Backorders
    8. Completing the Circle
    9. Next Steps
  15. Other Applications for XML (SOAP)
    1. Browser Detection
    2. Media
    3. Mobile Phones
    4. Adapting a Servlet for Wireless Devices
    5. The Simple Object Access Protocol (SOAP)
    6. Formatting Objects
    7. Where We Go from Here
    8. Getting More Information
    9. The Last Word
  16. Index