Search

Mobile tag

About Me

I am the "IBM Collaboration & Productivity Advisor" for IBM Asia Pacific. I'm based in Singapore.
Reach out to me via:
Follow notessensei on Twitter
(posts)
Skype
Sametime
IBM
Facebook
LinkedIn
XING
Amazon Store
Amazon Kindle

Twitter

Domino Upgrade

VersionSupport end
5.0
6.0
6.5
7.0
Upgrade to 8.5x now!
(see the full Lotus lifcyle) To make your upgrade a success use the Upgrade Cheat Sheet.
Contemplating to replace Notes? You have to read this! (also available on Slideshare)

Languages

Other languages on request.

Visitors

Useful Tools

Get Firefox
Use OpenDNS
The support for Windows XP is coming to an end and has . Time to consider an alternative to move on. sounds like a lot of time, but, like an object in a mirror, it is closer than you think.

« Importing EML files into Notes (lots of them) | Main| Teaching an ol' dog a new trick: SET CONFIG param=value update »

Extracting data from Domino into PDF using XSLT and XSL:FO (Part 1)

QuickImage This entry is part of the series Domino, XSL:FO and XSLT that dives into the use of XSLT and XSL:FO in IBM Lotus Domino.

We all know "Notes doesn't print". Nevertheless the topic of document output and reports is not going away, even if I'd like to ban the reports. There are plenty of ready made tools, but today I'd like to start with home cooked reporting.
Why the effort? Using only tools that use open standards you gain more control over the whole process and you can use whatever deems fit. The downside: it is more things you need to know and might not be suitable for business users (but its great to torture interns). In the long run you have a portfolio of source transformations that you can combine potentially faster than any reporting tool. The general principle is "Extract Transform Render":
Extract Transform Render
  1. Extract:
    Whatever will pull out the XML for the second step will do the trick. For list type of rendering ?ReadViewEntries will do the trick or simple DXL exports. Quite often you might opt for some bespoke code to extract code with an eye of a fast and/or easy transformation phase. You also might consider to extract your data in conformance with an established international standard
  2. Transform:
    This step usually takes the XML from the extract phase and runs it through one or more XSLT transformations. XSLT is kind of IT Black Magic (other say it's just set theory) and can use quite some computing power. For high performance the pros use a dedicated applicance. Once you get the heck of XPath you can do some amazing reporting (e.g. "give me all sales guys where withing the last 5 sales of the 3 guys next to his ranking there was a carpenter")
  3. Render:
    Rendering is easy. The outcome of the transformation step will be XSL:FO which is a page description language. Use a free renderer or a commercial offering and a few lines of code. The output typically is a PDF file, but you can target graphic formats too.
Once you look at the bigger picture you will see that the approach works for other sources too. Using a set of XSLT transformations you can render data in various ways including charts (but that's a story for another time.
Extract Transform Render in a bigger context
Now the stage is set for more details - in future post. I will look at the code that is needed to have a render engine running (in XPages most likely, but the Notes client is tempting too), how XSL:FO looks like, some samples of data extraction and of course the magic of XSLT.
Read Part 2 and stay tuned!

Comments

Gravatar Image1 - @Jim: when you export DXL you get "the full Monty" and that rendering takes time. For "I need this all the time" operations I rather advocate a SAX based generator that spits out the XML in a format closer to transformation ready.
stwEmoticon

Gravatar Image2 - { Link }

via dxl exporter bad performance, works better via xpages/web?

Gravatar Image3 - Thank you for this - I have been wanting to do it for some time now but as a Notes Classic type of guy didn't really know where to start (am currently using Word and COM to do all my printing which seems to be overkill). Am Looking forward to the rest of the posts :o)

Keep up the good work Emoticon

Post A Comment

Please note: Comments without a valid and working eMail address will be removed. This is my site, so I decide what stays here and what goes.

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)

Disclaimer

This site is in no way affiliated, endorsed, sanctioned, supported, nor enlightened by Lotus Software nor IBM Corporation. I may be an employee, but the opinions, theories, facts, etc. presented here are my own and are in now way given in any official capacity. In short, these are my words and this is my site, not IBM's - and don't even begin to think otherwise. (Disclaimer shamelessly plugged from Rocky Oliver)
© 2003 - 2013 Stephan H. Wissel - some rights reserved as listed here: Creative Commons License
Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/NonCommercial/ShareAlike Creative Commons License, with the exception that no rights are granted -- since they are not mine to grant -- in any logo, graphic design, trademarks or trade names of any type. Code samples and code downloads on this site are, unless otherwise labeled, made available under an Apache 2.0 license. Other license models are available on written request and written confirmation.