Web server version - CHAPTER 2 RELATED XML RECOMMENDATIONS XML and
CHAPTER 2 RELATED XML RECOMMENDATIONS XML and CSS You can use CSS with XML in exactly the same way that you do with XHTML. This means that if you know how to work with CSS already, you can use the same techniques with XML. I ll discuss CSS and XML in more detail in Chapter 5; this section just covers some of the main points. To display an XML document with CSS, you need to assign a style to each XML element name just as you would with XHTML. In XML, one difference is that the stylesheet is associated with an XML document using a processing instruction placed immediately after the XML declaration: In XHTML pages, the text that you wish to style is character data. With XML, that might not be the case. For example, the content might consist of numeric data that a human can t easily interpret visually. When working in CSS, it s not easy to add explanatory text when rendering the XML document. This limitation might not be important when you re working with documents that contain only text, but it might be a big consideration when you re working with other types of content. Another limitation of CSS is that it mostly renders elements in the order in which they appear in the XML document. It s beyond the scope of CSS to reorder, sort, or filter the content in any way. When displaying XML, you may need more flexibility in determining how the data should be displayed. You can achieve this by using XSL. XSL Extensible Stylesheet Language (XSL) is divided into two parts: XSL Transformations (XSLT) and XSL Formatting Objects (XSL-FO). The former transforms the source XML document tree into a results tree, perhaps as an XHTML document. The latter applies formatting, usually for printed output. Figure 2-3 shows how these two processes relate. Figure 2-3. Applying a transformation and formatting to an XML document Once the XSLT processor reads the XML document into memory, it s known as the source tree. The processor transforms nodes in the source tree using templates in a stylesheet. This process produces result nodes, which together form a result tree. The result tree is also an XML document, although you can convert it to produce other types of output. The conversion process is known as serialization. As I mentioned earlier, the
Note: If you are looking for reliable webhost to maintain and run your java application check Vision java hosting services