Archived at Pineapplesoft
 ananas.org 
  The Pineapplesoft Link newsletter covered a wide range of technical topics, see the archived issues.
The newsletter was first emailed in 1998. In 2001 Benoît discontinued it in favour of professional writing for magazines.
The “January 1999” page was archived in 2003 to preserve the original content of January 1999.
 
  | Home | Contact | Site map | Writings | Open source software |  


 

Welcome to the 13th issue of Pineapplesoft Link.

Firstly I would like to thank the readers who took the time to complete the online survey. The survey was very informative. I have summarized the conclusions at the end of this issue. The lucky winner is Mr. Jean Leporcq from Luxembourg. Congratulations Mr. Leporcq.
As always, you are welcome to send me your comments, questions or suggestions on the newsletter to [address removed, the newsletter is no longer published thank you for your support].

This issue is about XML style sheets. In particular, it discusses XSL, the end of year gift from the W3C to the XML community. The survey showed that there is lots of interest in XML topics amongst Pineapplesoft Link readers.

I wish you all an happy and successful year in 1999!

Online Bookstore

In Europe, books are delivered in less than a week with up to 20% price reduction! Worldwide shipping available. In association with Amazon.co.uk.

Style Sheets for HTML and XML by Frank Boumphrey (Wrox)
I found this to be a very good book on style sheets although it does not cover the latest version of the standard. The author concentrates mainly on HTML but there's good material, including a section on XSL, for XML developers.
Buy now at http://www.amazon.co.uk/exec/obidos/ASIN/1861001657/1960
Ships in 24 hours! 10% discount!

XML Applications by Frank Boumphrey et al. (Wrox)
A good introduction to XML programming and I really enjoyed the sample applications with examples on how to use XSL on the server.
Buy now at http://www.amazon.co.uk/exec/obidos/ASIN/1861001525/1960
Ships in 24 hours! 20% discount!

Batman - The Collected Adventures (Titan Books)
If you read my technical articles, you know that my Intranet server is called catwoman. This collection, inspired by the TV show, has a cleaner art style than the other Batman comics. It was originally intended for a younger audience but I find it more pleasing than other "adult" Batman comics.
Buy now at http://www.amazon.co.uk/exec/obidos/ASIN/1852865210/1960
Ships in 2-3 days! 20% discount!

XML Style Sheets

This month, the W3C published the second working draft for XSL (XML Style Sheet Language). Shortly afterwards, several XSL tools were available from Microsoft, Datachannel, Lotus and James Clark.

Styling

Style sheets are inherited from SGML, an XML ancestor. Style sheets originated in publishing and document management applications. However XML applications go behind traditional document management and, as I will explain, I think style sheets are useful for these applications as well.

SGML approach was to separate the document from its presentation. A document can be published in different forms on any media. For example, there's the hardcover edition, the pocket edition and the CD-ROM edition. In fact, with SGML, documents are "retargetable": the same document can be published automatically on different media including paper and electronic media. The operative word is automatically.

To achieve this goal, SGML (and XML) encode high-level semantic information. For example, XML markup would identify the title, the paragraphs and the keywords in a document. The markup is specifically not concerned with whether the title is in Garamond or AvantGarde font. The font, the size and the color are properties of a published document on a given medium.

More importantly, these properties can be automatically deduced from the high-level, semantic markup. Therefore software can automatically prepare documents for publishing. When printing, the title may be typeset in AvantGarde and the paragraphs in Garamond. Keywords require no special formatting but are compiled in an index. When publishing on the web, the title may be a graphic in its own frame and the list of keywords an index with hyperlinks.

Specific instructions on how to prepare the document for certain media are collected in style sheets. We would have different style sheets for print and for the web. We may even have different style sheets for the hardcover and the pocket editions.

How XSL Works

An XSL style sheet is a set of rules where each rule specifies how to format certain elements in the document. To continue the example from the previous section, the style sheets have rules for title, paragraphs and keywords.

With XSL, these rules are powerful enough not only to format the document but also to reorganize it, e.g. by moving the title to the front page or extracting the list of keywords. This can lead to exciting applications of XSL outside the realm of traditional publishing. For example, XSL can be used to convert documents between the company-specific markup and a standard one.

I want to stress that style sheet is not necessarily a client-side technology. One can apply style sheets on the client or on the server.

Indeed, to apply style sheets on the client, the user must have an XML browser which is still uncommon. Therefore applying style sheets on the server, is the realistic approach. In this case, the XML documents are converted to HTML on the server and the browser never really sees the XML or the style sheets.

A client-side solution is typically more flexible for the end-user, who has direct control over styling. However, it may not be option for you just yet.

The Added Flexibility of Style Sheets

Style sheets are, as we discussed, separated from documents. Therefore one document can have more than one style sheet and, conversely, one style sheet can be shared amongst several documents.

The ability to associate several style sheets to a single document means that the same document can be rendered differently depending on the media or the audience. We have already seen how style sheets make it possible to effortlessly publish a document on paper and online but, using the same technique, it is possible to tailor the document based on its audience. For example, a "managerial" style sheet may present a summary view of a document that highlights key elements but a "clerical" style sheet may display more detailed information.

The ability to share a style sheet between several documents is also helpful to enforce a corporate style. A common style sheet can go a long way towards enforcing a coherent look and feel for all the pages of a web site or brochures.

In this respect, style sheets are also very attractive for sites that resell contents and for Extranets. For example http://www.bankrate.com resells its content to quicken.com. It's the same information (the same document in XML parlance) but with a different presentation (different style sheets).

Extranets are an interesting special case. Currently, Extranet are HTML servers that follow the style of the Extranet publisher, not its users. For example, FedEx Extranet uses FedEx's own layout. The limitations of this approach are obvious when staff in one company must access several Extranets. For example, the staff in a mail order company may need to access not only FedEx Extranet but also DHL's and UPS' Extranets. The three Extranets, although similar in functions, have different "look and feel" and the staff must be trained and supported on all three.

If the choice of presentation were to reside with the consumer of the information, not the producer, a company could setup its own view on partners' Extranet. In fact, a company could reformat its partners' Extranet and integrate them with its Intranet, leading to an Intranet view of its partners' Extranets. As Extranets gain in popularity, the demand for such personalized Extranets will grow. Using XML servers and appropriate style sheets is an easy approach to offer personalized Extranets.

Better Style Sheet Languages

XSL is not a very large standard. This is in sharp contrast with previous attempts at creating a standard style sheet language. Several years ago, the ISO had defined a very complete style sheet language for SGML, known as DSSSL. However the standard was so complete and complex that it proved nearly impossible to implement!

The W3C has, wisely, decided to limit the scope of XSL. The resulting standard is simple and easy to implement but is also quite limited. In fact, as it stands today, it is likely that many applications will outgrow XSL. This is a problem that the W3C will have to address in due course but I still think their decision to go for a simple standard was a good one.

In the meantime, if you run into XSL limitations, be aware that there are other solutions on the market. Vendors such as RivCom or Omnimark are offering more powerful style sheet solutions but, obviously, they are not proprietary. These advanced style sheets offer more programming power and can be used to build advanced applications based on XML.

The browser has popularized the idea of applications as documents, where an application user interface is a document. HotFiles from Ziff-Davis <http://www.hotfiles.com> is a good example. HotFiles is a powerful database but, to the user, it looks like software reviews in a magazine. This is popular with users because the user-interface is so close to what they already know. In an Intranet or an Extranet, a similar approach is often taken for a catalog of parts.

Style sheets and in particular advanced style sheets offer a very attractive programming environment for these applications.

Conclusion

There are many applications for XML style sheets both for document publishing or for Intranets and Extranets. The W3C is working on a simple, yet effective, style sheet language. For more advanced applications, you will have to turn to nonstandard style sheet languages.

Self-promotion department

If you would like to start XML programming in Java or if you would like to learn more about DOM (the Document Object Model) or XML parsers in general, I recommend my latest Digital Cats article: Using XML with Java. http://www.javacats.com/US/articles/Ben/UsingXMLwithJava.html
Also available in Japanese http://www.javacats.com/JP/articles/Ben/UsingXMLwithJava.html.

If you would like to learn more about XML/EDI and the use of XML for electronic commerce, I suggest you participate in one of the seminars I will give for Edifrance in February or in May. These one-day seminars are organized for Paris.

For more information, contact edifr@worldnet.net or drop an email with your postal address to psol.be/go/contact and we will forward you the brochure.

Visit our web site and enjoy our new Mostly Business cartoon. In association with Ted Goff of Saturday Evening Post and Wall Street Journal fame, Pineapplesoft is proud to present you a new cartoon every day. So bookmark our page and remember to visit us every day! www.psol.be

Survey Results

This has been compiled from the results of the December 1998 survey.

Who are you, readers of Pineapplesoft Link? You most likely are a developer, a webmaster or the technical manager. You are knowledgeable (62%) or very knowledgeable (18%).

You like Pineapplesoft Link which you find it useful (55%) or very useful (45%). You also like the articles which are of good (68%) or very good (32%) quality. In general you read Pineapplesoft Link because it covers advanced Internet technologies.

You are also very happy with the length of the articles (82%) and, overall, think that the articles are technical enough (72%), although some of you would prefer more technical articles (34%).

In conclusion, you are happy (65%) or very happy (35%) with your subscription. Indeed you (96%) would recommend Pineapplesoft Link to your friends and colleagues: go ahead, point them to http://www.pineapplesoft.com/newsletter!

Your favorite reading is the featured article (86%). However you cannot agree on which issue you enjoyed the most. It seems that the XML issues do better but not by a significant margin. I take it that you appreciate the broad scope I'm trying to cover.

When it comes to covering the costs of publishing this newsletter, you would prefer that I turn to publicity (73%) rather than charge a subscription fee (15%).

Thanks again for taking the time to fill-in this survey.

About Pineapplesoft Link

Pineapplesoft Link is a free email magazine. Each month, it discusses technologies, trends and facts of interest to web developers.

The information and design of this issue of Pineapplesoft Link are owned by Benoit Marchal and Pineapplesoft. Permission to copy or forward it is hereby granted provided it is prefaced with the words: "As appeared in Pineapplesoft Link - http://www.pineapplesoft.com."

Editor: Benoit Marchal
Publisher: Pineapplesoft www.psol.be

Acknowledgments: thanks to Sean McLoughlin MBA for helping me with this issue.

Back issues are available at http://www.psol.be/old/1/newsletter/.

Write to me if you would like to sponsor the newsletter.

Although the editor and the publisher have used reasonable endeavors to ensure accuracy of the contents, they assume no responsibility for any error or omission that may appear in the document.

Pineapplesoft is a registered trademark of Pineapplesoft sprl in the Benelux.

Last update: January 1999.
© 1999, Benoît Marchal. All rights reserved.
Design, XSL coding & photo: PineappleSoft OnLine.