Book HomeCascading Style Sheets: The Definitive GuideSearch this book Sunday 18th of March 2018 03:02:00 AM

By not predefining any tags in the XML Recommendation, the W3C allowed developers full control over customizing their data as they see fit. This makes XML very attractive to encoding data that already exists in legacy databases (by using database metadata, and other schema information). This extensibility of XML makes it such a great fit when trying to get different systems to work with each other.

XML supports shareable structure (using DTDs)

Since the structure of the XML document can be specified in DTDs they provide a simple way to make it easier to exchange XML documents that conform to a DTD. For example, if two software systems need to exchange information, then if both of the systems conform to one DTD, the two systems can process information from each other. DTDs are not as powerful as some kind of schema architecture for XML, they don't support typing, subclassing, or instantiation mechanisms that a schema architecture must have.

DTDs are a simple way to make sure that 2 or more XML documents are of the same "type". Its a very limited approach to making "typed" XML documents shareable across systems. In the future some kind of schema system will be proposed by the W3C that should allow typing, instantiation and inheritance of information (in XML).

10.6. Borders

In CSS1, there are quite a few properties devoted to setting borders around element boxes, such as border-top-width and border-color, not to mention border itself. CSS2 adds a even more border properties, most of which are aimed at giving the author even more specific control of the borders. Before, it was difficult to set a specific color or style for a given side of the border, except through properties like border-left, and that could require more than one value. The new CSS2 properties address this, and their names are pretty self-explanatory:


Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

In your application layer, you can create many interesting Java applications. The apps can run on the server side or client side or both. They may have graphical user interfaces or they may be web based. When I use the word application or app in this chapter, I don't exclude Java applets; I mean application (or app) in the broad sense of the word, i.e., I mean it to describe a software system written in Java that solves a real-world problem.

3 Main categories

There are many different types of software that you can write in Java to make use of XML. I have created 3 major categories to describe certain types of apps (that are currently popular) that are really well suited to the use of XML. This is by no means a comprehensive set of categories; you can create your own, and many more major categories will emerge as XML becomes more popular.

Client side - Graphical Java Applications

just below the top border of the second line. This is because theborder is actually drawn on the next pixel (assuming we'reusing a monitor) to the outside of each linebox. Since the line boxes are touching each other, their borders willoverlap as shown in Figure 8-46.

If we alter the SPAN styles to have a backgroundcolor, the actual placement of the line boxes becomes quite clear, aswe can see in Figure 8-47.

BODY {background: fixed url(yinyang.gif) white top left repeat-y;} BODY {background: url(yinyang.gif) white repeat-y fixed top left;}
Figure 6-58

Figure 6-58. Using shorthand

Actually, there is one slight restriction to how the values are ordered in background , which is that if you have two values for background-position , they must appear together, horizontal first, then vertical. That probably isn't a surprise, but it is important to remember.

As is the case for shorthand properties, if you leave out any values, will be 20 pixels to the right of, and 30 pixels below, the top leftcorner of the containing element, as in Figure 6-43:

BODY {background-image: url(bg23.gif);background-repeat: no-repeat;background-position: 20px 30px;}
Figure 6-43

Figure 6-43. Offsetting the background image using length measures

This is, of course, different than percentage values, in the sensethat the offset is simply from one top left corner to another. Inother words, the top left corner of the background image lines up