Domino Blog dot com - Free Blog Toolkit for Domino

 web design framework for Lotus Domino  
 
Navigation
 
Site:
 ›home
 ›about
 ›news
 ›the author
 ›hire the author
 ›donate to site
 ›live! project cam
 ›projects
 
Issue Archive:
 ›may 2003
 ›april 2003
 ›march 2003
 ›february 2003
 ›january 2003
 ›december 2002
 ›november 2002
 ›october 2002
 
Technical:
 ›articles
 ›downloads
 ›links
 
DXFramework:
 ›about
 ›articles
 ›screenshots
 ›demos
 ›licencing
 ›take part
 ›documentation
 

Introduction

This is a follow on from the previous XML Series - Domino Basics article. Since that, I have also written one about creating an XML Document from a Notes document.

 

?ReadViewEntries

For ?ReadViewEntries there are a few more url commands that you can use that are not listed in the Notes Help database.

 

The first one being 'UntilKey' - this can be used with StartKey and basically lists the documents from the StartKey string to the UntilKey string - obviously unless count is also used and is reached first.

 

Another one is 'KeyType', this works with StartKey to set the "type" of the column data that is sorted. The default is text but if you do a KeyType=time then you can then use StartKey to start at a particular date on a date sorted column.

 

Example:


http://www-10.lotus.com/ldd/46dom.nsf/DateAllThreadedweb?openView&Keytype=time&StartKey=20021029&UntilKey=20021028&Count=-1

 

Since this view is sorted on a "date" column we have to use the KeyType=time, otherwise it would return nothing. Notice that the StartKey= must be in YYYYMMDD format. You can also include the time. I think the format for that is YYYYMMDDHHMMSS.

 

Using Forms to Deliver Notes Documents as XML

In my previous article, I mentioned there wasn't an easy way to extract XML from Notes Documents like using the ?ReadViewEntries view command. I went on to say you have to use Java and then I wrote an article showing you how to do just that.

 

I suppose I should have mentioned that you could, especially if you were starting a database from scratch, use a Notes Form to get Domino to deliver your document in XML.

 

Its quite straightforward really. Firstly your form should be set as "Treat Document Contents as HTML" in the On Web Access section of the Form Properties box.

 

 

Then at the top of your form you would place your 'document prolog' ie: <?XML version="1.0"?>. Then a main element name which is closed at the bottom of your form, and then surround your Fields with describing tags. For example I have created a Contact Form as so:

 

 

Which when viewed via a web browser looks like:

 

 

I have packaged this database up and can be downloaded from here so you can see how its built up.

 

Questions? - steve.castledine@projectdx.org

 
 
copyright 2002-2003 - Steve Castledine - ProjectDX.org