Forgive me if this is slightly off topic.

I have the following problem and want to know whether the following
technologies ( XML/XSL ) will solve it.

The scenario is as follows :

     Database

     Application Server ( MIDAS )

     Client


The Client saves a dataset locally to disk in the XML format. The user then
wants to produce some letters based on what is contained in a dataset and a
specified template.

Currently the approach to this problem is as follows :

The template is simply an html file with some key fields matching the
fields of the dataset. A process is written that will "simply" do a search
and replace of the fields in the dataset with the field names in the
template. The result will be a a HTML document for every record in the
dataset. This HTML document is able to be edited with the DHTML activex
component from Microsoft. Whilst this sounds simple in practise it is not
quite as easy as it sounds because when complexity is introduced through
the use of nested datasets, we get into a situation of having a complex
looping struture that has to interpret table HTML tags and so on so forth.
This is quite messy and therfore I am looking for a better approach.

A possible alternative to this is as follows and this is what I would like
some feedback on:

The client dataset can be stored as an XML document. We can use XSL as the
equivalent of the template and use its language properties to handle the
nested datasets and output an HTML document.

I have some questions with this approach.

To my knowledge we currently have very little control of the XML
representation of the dataset, we can't define our own DTD's and can't
change the structure that Delphi's internal parser produces.
Assuming that XSL can handle the nested datasets, can we output discrete
HTML documents for each row of the XML document, so that these can be
edited by the end user via the DHTML activex control. Or wpuld we better
off to do it this way - save the clientdataset locally in Inprise's binary
format, for each record in the dataset , generate an xml document which can
then be merged with the XSL style sheet and output one HTML document which
can then be saved/edited etc... This seems like it would introduce an
unneccessary step and I would much rather make use of the fact that we can
use the option of storing the client dataset as an entire XML document.

As an aside, currently the inbuilt XML parser of the client dataset doesn't
seem to be able to handle Memo fields, the whole process of saving craps
out completely  when a Memo field is in the client dataset. Is anyone aware
of this problem, is there a work around ?

Has anyone tried this whole XML/XSLapproach before ? Any pitfalls ? Will it
work ? Anyone have any better ideas ? Can anyone refer me to examples of
this sort of thing ?

Look forward to peoples responses,

Simon














---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to