This tutorial describes how to use the XML-processing capabilities built into Notes/Domino 6 to publish XML data.
It doesn't just tell you about all the cool new XML features in Notes/Domino 6 and how you might use them to publish XML data, but it actually shows you by providing a working demo program and walking you through its design step-by-step. The tutorial is based on a Domino database called
booklist.nsf, which has agents, a script library, and XSL style sheets set up to publish XML (describing a list of books) in both HTML format (for viewing with a browser) and PDF format (for printing as a book). The bulk of this tutorial describes the XML datatypes, the agent code, the script library code, and the XSL style sheets in detail, giving you a solid starting point for using Notes/Domino 6 to publish your own XML data.
The target audience for this tutorial is experienced Domino application developers who already know the basics of XML and XSLT.
You need to be familiar with Domino's LotusScript language, Domino application design elements (agents, script libraries, etc.), HTML, XML, XSL and XSLT style sheets, and you need to know a little bit about XSL Formatting Objects (XSL-FO).
This is an intermediate (or even an advanced) level tutorial, based on your experience designing Domino applications and using XML and XSLT style sheets. Luckily, there are many good resources on all of these subjects if you need to get up to speed quickly. If necessary, first consult the section called Resources . It contains references and links to some useful starting points on these subjects.
You'll learn about a number of new Notes/Domino 6 features and how to take advantage of them in your own application designs. This tutorial covers:
- An introduction to all the new LotusScript XML-processor classes in Notes/Domino 6, including classes not used in the demo code
- How to use the pipelining feature of the XML classes to simplify your XML-based applications
- The notion of XML vocabularies and how XSLT is often the tool of choice for translating XML from one vocabulary to another
- A little bit about XSLT technology (This tutorial is not a general, all-inclusive lesson about XSLT. There are volumes written on the subject, and this tutorial assumes you are already familiar with XSLT basics.)
- A little bit about XSL-FO technology and how to use it to produce print-oriented publications
- How multiple transformations (i.e., style sheets) can simplify your application designs and let you reuse work you or others have done before
You'll need to first install the following tools to run the samples presented in this tutorial:
Lotus Notes 6 for Windows
If you don't already have it, a free trial version of Lotus Notes 6 is available for download.
FO -> PDF composer from alphaWorks
Disclaimer: This is brand new software. It has bugs, and it does not implement the full XSL-FO specification yet. However, it is useful and can demonstrate where the technology is heading.
Sample booklist database (
booklist.nsffile to the local data directory of your Notes client.
One of the first things you'll want to do is open the
booklist.nsf file in your Notes client. After you open the database, select Help -> Using This Database. There you will find important notes that explain some final setup steps. You can then run each of the demo's action agents to get a quick feel for the power unleashed by the new XML features.
After you've done this you'll be ready to walk through the tutorial step-by-step and see exactly how the demo uses Notes/Domino 6 and XML to do the data transformations necessary to publish XML content (and NSF content, too!) in HTML and PDF formats. This should get you thinking about your own Notes/Domino projects. Ahhhh, the possibilities!
This tutorial derives from some preexisting work produced by both me and others, and so I would like to recognize them here and thank them for their contributions.
Gary Devendorf and I jointly prepared and co-presented Processing "Any" XML With Domino Rnext at Lotusphere in Orlando in January, 2002 from which all the demo programs in this tutorial were taken. Thanks, Gary, for providing inspiration, motivation, and content.
Special thanks, too, to Marji Berkman of the Domino Server Programmability Test team. Marji invented the
booklist.xml test file as part of her internal XML automated test suite, and the DXL-to-XML XSLT style sheet used in the demo comes directly from her work. Way to go, Marji!