We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made mistakes!). Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:
O'Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the U.S. or Canada)
(707) 829-0515 (international/local)
(707) 829-0104 (fax)
You can also send us messages electronically. To be put on the mailing list or request a catalog, send email to:
selections -- without having to resort to sprinkling classes or IDs throughout the whole document.
The most powerful of the new selectors is the universal selector. This is specified using an asterisk (*), and it matches any element in the document. Thus, use this declaration to make sure all elements have a color of black:
To ask technical questions or comment on the book, send email to:
We have a web site for the book, where we'll list examples, errata, and any plans for future editions. You can access this page at:
For more information about this book and others, see the O'Reilly web site:
Copyright © 2002 O'Reilly & Associates. All rights reserved.elements should be dark blue because they're associated with different types of information. The simplest way to handle this is to put a class of dkblue on each H2 that needs to be dark blue and declare the following:
It's actually better to pick class names that are descriptive of the type of information contained within, not of the visual effect you're trying to achieve at
XML enables interoperability
All of the advantages of XML outlined so far all make interoperability possible. This is one of the most important requirements for XML, to enable disparate systems to be able to share information easily.
By taking the lowest common denominator approach, by being web enabled, protocol independent, network independent, platform independent and extensible, XML makes it possible for new systems and old systems (that are all different) to communicate with each other. Encoding information in plain text with tags is better than using propietary and platform dependent binary formats.
we'll discuss later in the chapter.
22.214.171.124. Falling back on solid
There is one interesting thing about CSS that can make life difficultfor authors. According to CSS1, a user agent is allowed to interpretany value of border-style (besidesnone) as solid. Because of thisallowance, a user agent that is technically CSS1-compliant could
Depending on which of the three options you use to access information using your Java classes, this information must at some point be saved back to a file (probably to the one from which it was read). When the user of your application invokes a File->Save action, the information in the application must be written out to an ApplicationML file. Now this information is stored in memory, either as a (DOM) tree of nodes, or in your own proprietary object model. Also note that most DOM XML parsers can generate XML code from DOM document objects (but its quite trivial to turn a tree of nodes into XML by writing the code to do it yourself). There are 2 basic ways to get this information back into an ApplicationML file:
- You can generate the XML yourself (from your object model). If you created an object model that simply imports information from your XML document (using SAX or DOM), you would have to write a class that would convert your object model into an XML file (or set of XML files). This class would have to create an ApplicationML file that contains the information in your Java object model (which is in memory). Since this object model is not an adapter on top of DOM, it is not possible to use the DOM parser to generate the XML for you.
- You can use the DOM parser to generate the XML for you if you created an object model that is an adapter on top of DOM. Since your object model uses the document object tree, all the information contained in it is actually stored in the tree. The XML parser can take this tree and convert it to XML for you, you can then save this generated XML to a file. So the DOM parser can generate the ApplicationML file for you.
There are advantages and disadvantages to using some of the strategies to import and export XML. The complexity of your application data and available system resources are factors that would determine what strategy should be used.