Xsl And Any Notes Document

Does anyone have sample code of how to create a .xsl file from any Lotus Notes document?

I know how to create .XML from any Lotus Notes doc

Not getting how to do the .xsl

LotusScript or Java does not matter to me

Subject: Xsl And Any Notes Document

This will do the job, where “tserver” and “tdatabase” refer to the target-db. Here all design elements are selected, but you could limit it. To see the parameters have a look at the Designers Help:

Sub DoDump

Dim nc As NotesNoteCollection

Dim exporter As NotesDXLExporter

Dim msg As String



On Error Goto errh

Set targetdb = New NotesDatabase("", "")

Call targetdb.Open(tserver, tdatabase)

Set nc = targetdb.CreateNoteCollection(False)

Print "Getting design elements..."

Call nc.SelectAllDesignElements(True)

Call nc.BuildCollection

Set exporter = session.CreateDXLExporter(nc, stream)

Print "Exporting..."

Call exporter.Process

Call stream.Close

Print "Done"

Exit Sub

errh:

msg = "Error" & Str(Err) & ": " & Error$

If Not exporter Is Nothing Then

	msg = msg + Chr(10) + Chr(10) + exporter.Log

	Delete exporter

End If

Msgbox msg, 16, "Error"

Resume Next

End Sub