WebReference.com - Part 1 of chapter 12 of XSLT Developer's Guide, from Osborne/McGraw-Hill (3/6) | WebReference

WebReference.com - Part 1 of chapter 12 of XSLT Developer's Guide, from Osborne/McGraw-Hill (3/6)

To page 1To page 2current pageTo page 4To page 5To page 6
[previous] [next]

XSLT Developer's Guide

Processing Syndicated Content

Since XML has its roots in the area of electronic publishing, it naturally has an important role to play in content syndication. Since content syndication involves distributing and reusing information, the benefits of the use of a common vocabulary among the business partners are self-evident. Toward this end, the publisher and the subscriber of the information should ideally use a common protocol and information management model. With this in mind, an industry consortium designed the Information and Content Exchange (ICE) protocol around XML and submitted it as a W3C note in October 1998. When using ICE, you can keep the structured content in XML form independent from the protocol itself and use the standard HTTP POST request/response model for content transport. ICE supports the use of both "push" and "pull" models for distribution of the content. ICE is slowly being adopted by software vendors and large companies such as Reuterspace Media Group (Reuters).

The name Reuters is practically synonymous with content syndication, providing news and information feeds to over 900 web sites. Reuters has been publishing electronic content to such web sites since 1994, and in April 2000 the group launched its Internet delivery system (IDS), which leverages ICE. This is probably the strongest endorsement of XML and ICE in the area of content syndication. Since we have already discussed an example of XSLT use in the area of content syndication, let us move on to the next topic.

Building Presentation-Independent Applications

As we have progressed from monolithic, stand-alone applications to client-server systems to n-tier web applications, the advantages of separating data from presentation has become increasingly apparent. In building enterprise web applications, we must pay close attention to the types of client that will access these applications. Particularly important are thin clients such as web browsers and wireless devices such as ones that support WAP. Thus, we should aim at having common tiers to support data management and application logic and provide separate presentation schemes for each of the clients that the application must support.

Since its development began in 1996, XML has been on the fast track to becoming the de-facto standard for structuring platform-independent portable data and thus facilitating information interchange. SGML, a superset of XML, is an international standard (ISO standard since 1986), which further adds to XML's strength in building a new breed of n-tier applications that may be used globally. XML does not put any restrictions on how the client may interpret and present this data. In fact, this ability to delegate the transformation and presentation aspects to another tool gives XML its true power.

Content publishing in multiple output formats, syndication of the content, data delivery to diverse channels of presentation, and a powerful way to provide rich metadata (that is, data about data) are where the combination of XML, XSL-FO, and XSLT could play particularly well.

As an example, let us consider an n-tier application that has customer data stored in the back end. Since we are concerned primarily with understanding XSLT application, we will assume that the customer data has been extracted and is available in the form of the following source XML file, customers.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="Present2HTML.xsl"?>
  <Company CompanyID="7001" >
    <Name>Powergadgets, Inc.</Name>
    <SalesRep EmpID="20556" Region="Southcentral">
      <Address_line1>111 Corporate Boulevard</Address_line1>
    <About> Powergadgets is a Fortune 222 company and has been doing
    business with us for 20 years. Roughly 40 % of our revenue come
    from Powergadgets. This customer should be treated very well. Should
    any problem arise at all with this customer, make sure that you bring
    the matter to the attention of the VP of Sales, Jerry Salinger.
  <Company CompanyID="8002" >
    <Name>Ultimate Tools, Inc.</Name>
    <SalesRep EmpID="88157" Region="East">
      <Address_line1>222 57th Street</Address_line1>
      <Address_line2>Suite 990</Address_line2>
      <City>New York</City>
    <About> Small, but very innovative, Ultimate Tools has received a lot of
    media attention of late. We know that they purchase more material from
    our largest competitor. Also, the volume of their orders tends to be
    relatively small. But given how fast they are growing, we expect that
    they will be one of our top 10 customers in the next 5 years.
  <Company CompanyID="9889" >
    <Name>Ultra Machines Corporation</Name>
    <SalesRep EmpID="22222" Region="Midwest">
      <Address_line1>333 Lake Shore Boulevard</Address_line1>
      <Address_line2>Suite 12001</Address_line2>
    <About> Ultra Machines was spun-off from Robotics Corporation about 4
    years ago. Like many other very successful spin-offs, this company has
    shown unfailing growth quarter after quarter. Even in the most difficult
    economic times they have never incurred a loss, and their cash flow is
    very solid.

To page 1To page 2current pageTo page 4To page 5To page 6
[previous] [next]

Created: May 28, 2002
Revised: May 28, 2002

URL: http://webreference.com/authoring/languages/xml/xsltdev/chap12/1/3.html