OpenNTF.org - Using XSLT with domino generat
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Using XSLT with domino generated xml (from views and outlines) 
Rating:
Rating: 3.75 , Number of votes: 4 
Contributor:
Jack Ratcliff 
Category:
XML/XSL 
Type:
System info 
Document Release:
Notes Version:
R5.x 
Last Modified:
15 Jul 2005 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
This db gives some examples on how to transform (using XSLT) xml data generated from Domino into HTML.


I have an example for an outline and an example for views.

NOTE: THIS ONLY WORKS FOR R5. If you are using ND6+ then use Domino Web Tools (http://www.openntf.org/Projects/pmt.nsf/ProjectHome?ReadForm&Query=Domino%20Web%20Tools).

Domino Web Tools has xml/xslt views and outlines as well as some more goodies. It is also being updated and maintained whereas this code in the xml-xlst.nsf db is not.

Usage / Example
For views, look at the $$ViewTemplateDefault. Basically you should be able to copy and paste this $$ViewTemplate default into your own datbase to get it to work.

For outlines, look at the configView form.

I haven't had the time to fully document how to use these examples but I'm guessing that everyone here is smart enough to figure it out.

Oh, on the $$ViewTemplateDefault and the configView form, you'll need to change the refereces to the js and css pages listed in the HTML Head section.
Code Attachments
xml-xslt.nsf (729 Kbytes)
 Comments
Posted by Werther D. Vervloet on 03/20/2003 02:36:45 AMGreat Job!
This application is great! We are doing some job to make easier to develop views and take the information in XML and transform them with XSL. We did a litle work in displaying the number of documents the view posess and where are you in this list. We also did some work in storing the last position a user was in a particular view, so the next time he enters the view we can show it just like the last time. Waht do you think in create a project to design a full documented template that we can use? I would be very interested and I have time (not much) to work in that. Wait for comments. Thanks
Posted by Jack Ratcliff on 04/06/2003 02:08:11 PMre: Great Job
Posted by Werther D. Vervloet on 04/07/2003 09:22:44 PMProject
Posted by Werther D. Vervloet on 04/07/2003 09:26:36 PMServer Side Transformation
Posted by Werther D. Vervloet on 07/03/2003 09:11:17 AMServer Side Transformation
About the server-side transformation, I already try that, but I don't know how to take the information in the view (readviewentries) with the credentials of the user. Do you already have a solution to this? Regards, Werther
Posted by Werther D. Vervloet on 07/03/2003 09:11:21 AMProject
Jack, I think this is a good idea. Can you start a project with your new code? I'm finishing the document counter and I can put this in the code. Best regards, Werther
Posted by Jack Ratcliff on 07/03/2003 09:11:26 AMre: Great Job
Sounds good to me. I've made some improvements to this sample db that I need to post. I'm also working on a version that does the transformations server-side (we have the need to support IE on the Mac and Microsoft's XSL Transformer, MSXML, doesn't work on a Mac). I have some time I can spare to help with this. Should we make it a project and see who will help?
Posted by Mirek Navratil on 09/23/2003 05:37:00 AMServer-side transformation
I spent many ours trying to make server-side transformation of the view (readviewentries) but failed to authenticate user (I tried both LS and JAVA). Exactly he same problem as mentioned by Werther. That's a pitty I've not notice this document earlier.
Jack, if you decide to start the new project to address this issues I would like to participate.
Posted by Jack Ratcliff on 10/03/2003 10:58:36 AMI have time to make this a project now
I have made a few fixes and enhancements to me current code and would like to provide a way to do this server side with either a servlet or agent.
Posted by Werther D. Vervloet on 10/03/2003 06:06:53 PMLet's transform this in a project?
Jack and Mirek,
I think we can start a projet with this code. I am changing the code to put Sametime Awaereness in views, and we have to change the code to R6 because the result of ReadDesign is in lowercase and in R5 is ProperCase. I have others ideas and want to share with you.
Are you intersted?
Regards,
Werther
Posted by Jack Ratcliff on 10/06/2003 10:38:11 AMSounds good to me
Here are some things that I would like this project to supoort
ND6 support
Sametime Awareness
Server-side Transformations
I'm sure we could come up with many others but the main thing is to come up with an easy to use framework for presenting outlines and views to the web in a more friendly and usable format than what comes standard with Domino. Too many developers have to spend way to much time to get outlines and views formatted for the web. Providing this framework will allow these developers to focus on the business needs of their apps.
Before I get a project going, do you guys have any good ideas for a project name?
Jack
Posted by Werther D. Vervloet on 10/06/2003 10:56:09 AMNew Project
Hi,
I have some good news. I already have the framework functioning in ND6 and yesterday I put Sametime Awareness in production. I have a sametime server here and I can put the peoples intersted in this project in my NAB. I think Good Looking Views and Outlines a good name for the project.
Let me know.
Regards,
Werther
Posted by Jack Ratcliff on 10/06/2003 02:15:55 PMProject Name
"Good Looking Views and Outlines" doesn't quite do it for me. I know that the end result is this but I want the project name to convey more of a "framework/tool/utility" that can be plugged in anywhere to produce good looking WEB views and outlines.
Also, do we want the project just limited to views and outlines or do we want to take on other areas that address web based UI issues? I have been working with 3 other open source projects (popup calendar, dhtml menu, rich text editor) that could also be incorporated eventually into this project. What we could end up with is a database for Domino WEB developers to use to help in formatting views and outlines, creating popup calendars, menus, rich-text editors and more.
Perhaps we can name the project "Domino Web Tools" and the first deliverable could be the view and outline code. Later we can add the popup calendar, dhtml menus, rich-text editor, etc. What do you think?
Posted by Werther D. Vervloet on 10/06/2003 02:20:00 PMRE: Project Name
Sounds good to me. I'm working with this gadgets too. In fact I'm changing your code to generate a menu based in DHTML Menu builder automaticaly via outline. I think Domino Web Tools is quite a good name.
Regards,
Werther
Posted by Jack Ratcliff on 10/06/2003 02:35:01 PMRE: Project Name
OK, it's settled then. I'll post a main topic for "Domino Web Tools" and then convert it to a project idea.
Cheers,
Jack
Posted by Sunil G on 10/13/2003 06:35:54 AMJack Ratcliff - View Column Title
Hi Jack. With the code you have posted, is there a way to show the view columns ? Was just playing around with it, as a part of learning xml/xsl. Can you let me know how to do that?
Thanks
Sunil
Posted by Jack Ratcliff on 10/14/2003 12:35:53 PMre: View Column Title
Hi Sunil,
The code I posted should already show the "title" of a view column. I'll take a look to see why it isn't.
Jack
Posted by Sunil G on 10/14/2003 10:21:38 PMre:re:view column title
Thanks Jack. Have couple of other questions? Can we represent column as icons ? Also I noticed that when we have categorized views and the view is expanded, the first column title gets truncated. Can we handle this using your code? Can you let me know how you do that? Sorry for spamming you with so many questions. Still at the learning curve on xml/xsl.
Posted by Jack Ratcliff on 10/16/2003 04:23:52 PMre: More Questions
Hi Sunil,
"can we represent column as icons?" >> yes, if you set up the column like you would for notes to show an icon then it will work with this code.
"...the first column title gets truncated." >> this is fixed in my latest version along with a few more bug fixes. I was planning to post it once we get a "project workspace" created but that hasn't been done yet. If you want me to email you the latest code with these fixes then email me at jratcliff - at - rocktenn.com
Posted by Jack Ratcliff on 10/16/2003 04:43:02 PMProject Workspace created for Domino Web Tools!!
Finally had a "convert to project" button show up on my main post so here it is
http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/Domino+Web+Tools
Posted by Sunil G on 10/20/2003 06:31:08 AMView - Action Buttons
Hi Jack. Is there a way to display the action buttons on the view using the Microsoft's XSL Transformer & MSXML ? Or this has to be done using the DXL ? Pls. can you let me know how to go about achieving this ?
Thanks
Sunil
Posted by Michael Johnson on 03/12/2004 01:09:38 PMmenu/outline does not display in R6
Hi Jack,
I downloaded your database (and it looks great BTW). I was able to view it ok locally but when I put in on an R6 server, the views display fine but the outlines does not. Can you please guide me as far as what I should check for?
Thanks,
Michael
Posted by Jack Ratcliff on 03/12/2004 07:42:24 PMThe XML generated from a Domino 6 server is in a different case
I'm in the process of updating this code in the Domino Web Tools project. Hopefully by Monday (3/12) I'll have v 1.0.4 posted that will include xml/xslt outline support for Domino 6 servers.
Eventually, I hope to have the Domino Web Tools project support both R5.x and R6.x Domino servers for the xml/xslt view and outline code.
Posted by Michael Johnson on 03/12/2004 08:32:13 PMre:The XML generated from a Domino 6 server is in a different case
Thank You Jack. I look forward to it......
Posted by Martin KraussSIT on 04/08/2004 08:44:02 AMNew version 1.0.4
Hi Jack,
I was just looking for the promised version 1.0.4 but could not find it. Or is it included in the other project ?
If there is not a new one could you pls explain once more how I can get the current version work in Domino 6.
Thanx Martin
Posted by Andre Horak on 08/23/2004 04:38:38 AMPrinting of Web Views
Hi everyone,
Apart from the normal on-screen display issues one would normally experience when using the standard HTML views, I also have a serious problem when it comes to the printing of these views from a browser. I have recently come accross some code that allows you to control what is displayed on screen, and what gets printed from a web view. This also includes the ability to repeat view (table) headers and footers on each printed page. Do you guys have anything like this included in your code? If you are interested I'd gladly forward you the details on controlling the printing of tables / views.
Regards,
Andre Horak
Posted by Jack Ratcliff on 08/23/2004 12:57:07 PMre: Printing of Web Views
Hi Andre,
Yes, whatever you have to share would be great. I have a domino web based reporting application that uses the CSS table-header-group and table-footer-group display properties that I planned on using.
By the way, all of this code is now being maintained in the the "Domino Web Tools" project.
Posted by Sridhar Reddy on 11/03/2004 11:43:34 PMMultiple value fields & Vertical Scroll
Hi
I have downloaded this Db and implemented in one of my project
i have this following problems
i have multi value fields which i have to show in the view in new line, i could not able to do this, even though i mentioned New line in the view properties, it shows me seperated with commas
and i want to remove the vertical scroll
I'm poor in XML
Jack Please help as i need it Urgently
Posted by Chris Janning on 06/07/2005 05:44:29 PMColumn names?
Love the views but how can I add the column names? I found "handleHeaderRow" in the XSL but it doesn't seem to be calling it.
Posted by Jack Ratcliff on 07/15/2005 10:29:27 AMre: Column names
Hi Chris,
I'm guessing you are using a Domino 6 or higher server. Lotus changed the xml that was generated from a view?ReadDesign in Domino 6. The column info is in the ?ReadDesign and thus this code only works on R5 servers.
If you have Domino 6 or higher then use my Domino Web Tools project (http://www.openntf.org/Projects/pmt.nsf/ProjectHome?ReadForm&Query=Domino%20Web%20Tools). It has the xml/xsl view code as well as some more goodies.
Jack
 Add your comment!