Friday 20th of April 2018 04:40:26 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: H

half-leading: 8.4.2.1. Generating a line box
hanging floats: 7.6.1.2. Negative margins and floating
hanging indents: 4.1.1.1. Indenting text
hash mark (see octothorpe)
header of a table: 10.7. Tables
Hebrew, default text alignment: 4.1.1.2. Aligning text
height
block-level elements: 8.2.1.1. Height
limiting via min-max properties: 9.1.3.2. Limiting width and height
lines (see line height)
positioning and: 9.1.3. Width and Height
height property: 7.1. Basic Element Boxes
9.1.3.1. Setting width and height
hexadecimal colors: 3.1.2.3. Hexadecimal colors
list of: 3.1.2.3. Hexadecimal colors
hiding styles with @import: 11.2.2. Hiding Styles with @import
hierarchy of elements: 2.5. Structure
horizontal alignment: 4.1.1.2. Aligning text
horizontal formatting: 8.2.2. Horizontal Formatting
horizontal margins, noncollapsing: 8.2.2. Horizontal Formatting
horizontal properties, block-level elements: 8.2.2.1. Horizontal properties
:hover pseudo-class: 10.2.3.1. :hover
HREF attribute: 1.4.1.1. LINK attributes
HSPACE attribute: 8.1. Basic Boxes
HTML: 1.1. The Web's Fall from Grace
4.0 specification, phasing out tags: 1.2.6. Preparing for the Future
combined with CSS: 1.4. Bringing CSS and HTML Together
11.1.2. Case 2: Library Catalog System Interface
selectors in: 2.1.2. Simple Selectors
structure: 2.5. Structure
STYLE element: 1.4.2. The STYLE Element
styling compared to CSS: 1.2.1. Rich Styling
tips for using: 11.2. Tips & Tricks
whitespace in: 4.1.1.3. Handling whitespace
HTML attributes
ALINK: 2.4.1. Pseudo-Class Selectors
of BODY element: 2.4.1. Pseudo-Class Selectors
6.1.1.1. BODY attributes
CLASS: 2.3.1. Class Selectors
HREF: 1.4.1.1. LINK attributes
HSPACE: 8.1. Basic Boxes
LINK: 2.4.1. Pseudo-Class Selectors
of LINK element: 1.4.1.1. LINK attributes
quotation marks with: 5.1.3. Using Quotation Marks
single attribute values, matching: 10.2.2.3. Matching single attribute values
STYLE: 1.4.6. Inline Styles
2.7.1. Inheritance and Specificity
2.8. The Cascade
5.1.3. Using Quotation Marks
TYPE: 1.4.1.1. LINK attributes
VLINK: 2.4.1. Pseudo-Class Selectors
HTML comments: 1.4.4. Actual Styles
HTML documents, style sheets linked to: 1.4.1. The LINK Tag
hyperlinks
background images, placing in: 6.2.1. Background Images
color, setting: 6.1.1. Foreground Colors
removing underlining from: 4.1.6. Text Decoration
hyphenated values, matching: 10.2.2.5. Matching hyphenated values
hyphenation: 4.1.1.2. Aligning text


Symbols | A | B | C | D | E | F | G

XML is structured

When you create your data using an XML editor (that you can write), you can not only input the content of your data, but also define the structural relationships that exist inside your data. By allowing you to define your own tags and create the proper structural relationships in your information (with a DTD), you can use any XML parser to check the validity and integrity of the data stored in your XML documents. This makes it very easy to validate the structure and content of your information when you use XML. Without XML, you could also provide this validation feature at the expense of developing the code to this yourself. XML is a great time saver because most of the features that are available in XML are used by most programmers when working on most projects.

By using XML and Java, you can quickly create and use information that is properly structured and valid. By using (or creating) DTDs and storing your information in XML documents, you have a cross-platform and language independent data validation mechanism (for free) in all your projects!

You might use XML to define file formats to store information that is generated and used by your applications. This is another use of the structured nature of XML. The only limitation is that binary information can't be embedded in the body of XML documents. For example, if you wrote a word processor in Java, you might choose to save your word processor documents to an XML (actually your ApplicationML) file. If you use a DTD then your word processor would also get input file format validation as a feature for free. There are many other advantages to using XML and a file storage format for your applications which will be illustrated later in the chapter.

Here are some benefits of the structured nature of XML:

| H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z


Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

auto gets a little tedious. After all, all we want to do is affect the margin on one side of the element as shown in Figure 7-14, which leads us to the next topic.

Figure 7-14

Figure 7-14. Setting a new value for just the left margin

7.3.4. Single-Side Margin Properties

Fortunately, there'selements based on what attributes they have. As an example, the rulesshown here will match the following two INPUTtags, respectively:

INPUT[type="radio"] {color: #333333;}INPUT[type="checkbox"] {color: #666666;}<INPUT TYPE="radio" NAME="r2" VALUE="A "><INPUT TYPE="checkbox" NAME="c3" VALUE="one ">

This allows you to dispense with the classes altogether, at least inthis instance. See the Chapter 10, "CSS2: A Look Ahead", for more details

How can XML help app servers do their work? As you can see in Figure 2, in order for the app server to harvest information from such a rich variety of sources, there must be some common ground between all of these sources (each of which might be running on a different hardware and software system). This common ground is the information which flows throughout the entire system, regardless of what source the information comes from. CORBA is an example of tying disparate systems together based on the interfaces that certain remote objects implement. XML does the same thing for data. It allows these disparate systems to share information in a medium that consists only of pure information (and the structural relationships that exist inside of that information). By taking the lowest common denominator approach by using plain text to encode data, XML allows these systems to talk with each other without requiring any special binary information format converters or other service layers to translate between binary formats (for encoding data). Also, since HTTP already supports transmission of plain text, it is completely natural to move XML around using the Hyper Text Transfer Protocol through firewalls and disparate networks. This is shown in Figure 3. XML can be transmitted between systems using one of the most prevalent protocols in use today, Hypertext Transfer Protocol or HTTP 1.1 (which is the protocol of the web).

App server developers are not restricted to using HTTP, they can transmit and recieve XML information using simple remote CORBA objects and RMI objects. The key is that by using XML, it makes these remote services or objects easier to build. And, by sticking with XML, any one of these technologies can be used in your design of your app server. You can use whatever technology is most appropriate to getting the job done, knowing that all the information flows as XML and can be processed by any part of the system. The reason Java object serialization did not achieve this is because it encodes object data to a binary format that is dependent on too many things (like the JVM version, and the existence of classes when things are deserialized, etc). XML is not limited by any of these restrictions (or problems), which makes it much easier to create systems that allow XML information to flow between different subsystems. Also by relying only on the data, large portions of the system can be replaced with better or different implementations for future-readiness.

App servers traditionally give their client apps access to information in remote databases, remote file systems, remote object repositories, remote web resources, and even other app servers. All these information sources don't even need to reside on the machine that hosts the app server. These remote resources may be on other machines on the Intranet or the Internet. Using Java and XML, RMI, JDBC, CORBA, JNDI, Servlet and Swing, you can create app servers that can integrate all kinds of remote and local information resources, and client apps that allow you to remotely or locally access this information from the app server.

P SPAN {font-weight: 400;} /* so does this */STRONG {font-weight: bolder;} /* bolder than its parent */STRONG B {font-weight: bolder;} /* bolder still */<P>This paragraph contains elements of increasing weight: there is an<SPAN>SPAN element which contains a <STRONG>strongly emphasizedelement, and that contains a <B>boldface element</B></STRONG></SPAN>.</P>

Figure 5-12

Figure 5-12. Moving up the weight scale

In the last two nested elements, the computed value of

Web-based applications are similar to app servers, except for one thing: Web-based applications don't have client apps, instead they use web browsers on the client side. They generate their front ends using HTML, which is dynamically generated by the web-based app. In the Java world, Servlets are best suited for this job.

Web-based apps might themselves rely on another app server to gather information that is presented on the client web browser. Also, you can write Servlets that get information from remote or local databases, XML document repositories and even other Servlets. One good use for web-based apps is to be a wrapper around an app server, so that you can allow your customers to access at least part of the services offered by your app server via a simple web browser. So web-based apps allow you to integrate many components including app servers, and provide access to this information over the web via a simple web browser.

Web-based apps are very deployable, since they don't require special Java VMs to be installed on the client side, or any other special plug ins, if the creator of the web-based app relies solely on HTML. Unfortunately, this can restrict the level of service that can be offered by a web-based app when compared to the functionality offered by custom clients of an app server, but they are a good compromise when it comes to providing web-based access to your information. In fact, in a real world scenario, both a web-based app and app server may be used together, in order to provide your customers access to their information. In an Intranet setting, you might deploy the clients that come with the app server, and in an Internet setting it would be better to deploy a web-based app that sits on top of this app server, and gives your customers (relatively) limited access to their data over the web (via a simple web browser).