Good point Charles, I will ask him about that

Regards
Brian

  ----- Original Message ----- 
  From: Charles G. Wolf 
  To: Dataperfect Users Discussion Group 
  Sent: Wednesday, June 11, 2008 10:27 AM
  Subject: Re: [Dataperf] Documenting your DP Database with XML and XSLT


  Hi Brian,

  Would it be possible for Lew to fix that header problem with WP merge files 
that crept into 2.6?  You know, the one you gave me the code sequence for.

  Thanks.
  Charlie


  Brian Hancock wrote: 
    Hi Everyone,

    I thought I would share this application with the group. I often use the 
STE-MGR program to document databases. Although it documents database 
completely the results are not so easy to read. 

    For those not familiar with the STE-MGR.COM application and the companion 
STE-BASE.STR. Its a program for documenting your DataPerfect database and even 
for making changes, and it is extremely useful. To use it is very simple, you 
execute the STR-MGR program, and select the STR of the DP application you are 
wanting to document.  The STE-MRG program creates a file which is has the same 
base filename as your DP application with the extension {L}.  This file is a 
synthetic DP Transaction Log.

    Once you have this file you import it into the STE-BASE.str application. 
Open DP and the STE-BASE application, and if its the first time recreate all 
the indexes etc when it prompts you. Import the transaction log you created 
with Shift-F9 - Import transaction log. This populates the various panels of 
the STE-BASE application with details of your application.

    I have modified the STE-BASE application to add a couple of more links, and 
the addition of two more panels, plus I have added a report which exports much 
of the data as an XML file. The basic functionality of the STE-BASE is 
unchanged it just has a few more things. It started out as an  

    The new reports produces a file STE.XML. The application also includes an 
XSLT file to style the document so it can be displayed in a browser, there are 
a couple of Javascript files that do things such as making the STE-BASE's 
representation of field formula easy to work with.

    The links to the complete application is 
http://www.brileigh.com/dpweb/STE-DEF_019.zip   it contains

    STE-MGR.COM  (standard, same one that is supplied with DP.Only later 
versions came with this)
    STE-BASE.str (modified from the original than comes with DP)
    STE-Def.xsl ( this file is the transformation that will generate HTML)
    STE.js (some basic Javascript, mainly to tidy up DP formula's which are 
normally very hard to read in the STE-BASE program) 
    wz_tooltip.js (open source HTML tool tips, open it to view its credits)

    All files should be unzipped into the same folder. together with your DP 
executables and your applications STR. You run the STE-MGR as I have noted 
above, and then run the Report "XML Database descriptor"

    The STE.XML includes a processing instruction to tell it to use the 
STE-DEF.xsl to transform it. Depending on how big your application is it might 
take a little while to generate the file. When it does you will see the 
structure of your application. You can selective show or hide various parts of 
the definition, so that if you choose to print it it will not take up so much 
paper. You can open up all the formulas to view, or click on individual formula 
to see their contents. 

    I have modified the STE-BASE application to add a couple of new panels. One 
for adding comments to Panels, and the other for adding comments to Fields. If 
you are developing a DP application you might want to make more notes about a 
fields purpose, etc.  When viewing the results in your your browser if you pass 
your mouseover any red print (eg panel names, field names and fields used in 
formula) it will show you more information or notes about the item..

    The STE-BASE is generally a one shot program in that once you import the 
data you need to empty the database before you import a new log file.  Emptying 
the database completely would remove your additional notes that have been made, 
so I have made some changes so that if you delete the STE-BASE-HDR record, it 
will cascade delete through the rest of the definition data except the notes, 
ready for a new import. The notes will be preserved for the new import, 
although if you delete fields, or change their purpose, you will need to change 
or delete the notes. (its not a Perfect world).

    Apart from being useful application for documenting your applications, it 
shows what can be done with a simple XML file and transforming it with XSLT.

    My original goal before I wrote the application was to write a program to 
graphically display a DP Entity Relation diagram, much like DPLinks does, 
except that Panels could be dragged into place so you could choose the layout, 
and additionally the diagram would contain information about the Panel or Data 
link, and the panel's fields. Much like say a Microsoft Access Relationship 
screen.  I haven;t yet finished that.  

    I intend to write an application which will also document reports more 
throughly. Some of my reports are absolute nightmares to later decipher.  

    Regards
    Brian
----------------------------------------------------------------------------
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
  

------------------------------------------------------------------------------


  _______________________________________________
  Dataperf mailing list
  [email protected]
  http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to