Standard Applications

Although from a practical standpoint all XML applications are created equal, certain applications are so general-purpose that they fall into the purview of standards organizations (like the ISO or the W3C). These standard applications are intended to be used, in turn, by other developers who are building their own special-purpose applications.

Extensible Stylesheet Language (XSL)

One of the primary design goals of XML was to provide an environment where document content (such as a phone number) could be separated from presentation information (such as the formatting instructions making the phone number bold and italic). Although XML documents are very well suited to expressing information, at some point they generally must be formatted for human consumption. XSL is the W3C's solution to the problem of transforming and displaying XML documents.

XSL is actually a blanket term that covers two separate technologies—one for transforming XML documents into other formats and another for describing page layout and formatting in XML. These two technologies are called XSL Transformations and XSL Formatting Objects, respectively.

XSL Transformations (XSLT)

Oddly enough, the XSLT portion of the XSL recommendation is already a W3C recommendation (as of November 16, 1999). As with XML and Namespaces for XML, it was decided that the immediate need for an XML transformation language was too pressing to delay it until the entire XSL specification was complete. In operation, an XSLT stylesheet document is an XML document that contains templates that describe how a source document is to be modified to create a target document. Figure 3.2 shows an example of how this process works.

Figure 3.2. The XSLT transformation process.


Using this technique, the same source document might be rendered into half a dozen target formats (such as XHTML, XSL-FO, plain text, or a different XML application). Currently several full-featured standalone and integrated XSLT transformation programs are available. See the next chapter for a list and brief description of these tools.

XSL Formatting Objects (XSL-FO)

Unlike XSLT, XSL-FO does not specify how to transform XML into another format. Instead, it is a very sophisticated XML vocabulary for specifying how to lay out text and graphical information on a page (or series of pages). Although it is technically possible to author XSL-FO documents directly, the more common intended use is to use a transformation language (particularly XSLT) to transform an XML document into an XSL-FO document.

The XSL-FO portion of the XSL specification has still not been finalized, and there are presently no browsers or display programs that show XSL-FO pages directly. The current solution for testing and developing XSL-FO production systems is to use a translator program that converts XSL-FO documents into a more widely supported page-layout format (such as Adobe's PDF or PostScript).

XML Schema

One of the more controversial and widely discussed of the recent XML-related standards is the XML Schema recommendation. Schemas were originally intended to provide a more strongly typed and flexible language for validating the contents of XML documents. Like XSLT style sheets, XML Schemas are themselves valid XML documents. Chapter 2, “XML Tutorial,” includes a comprehensive introduction to both DTDs and schemas.

Resource Description Framework

As more and more content becomes available on the Internet, the need for some standardized method for cataloging and expressing information about a document's content becomes keener. Basically, the RDF recommendation defines an XML vocabulary for making informative statements about things. For instance, expressing the idea that “W. Scott Means is the author of Strategic XML” could be encoded in RDF like this:

<?xml version="1.0"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:sxml="http://namespaces.strategicxml.com/example/bookinfo">
  <rdf:Description about="Strategic XML">
    <sxml:Author>W. Scott Means</sxml:Author>
  </rdf:Description>
</rdf:RDF>

As with XLink, the acceptance of RDF is considered to be an important part of the development of the semantic web. If more document authors take steps to provide meta-information about the information they publish, search engines will be able to provide higher-quality content to end users.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.107.13