DTD from structure.

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

I am trying to create a function to 'snapshot' the current state of data on a client form, allow working, and then if required restore to previous state. the 'simplest' method would seem to be to create a DTD from the structure of the form, use xmlsave to put the data into XML and, if required, do a clear and xmlload to reset the data back wheer you got it from. BUT. 1. Create DTD from structure, doesn't pay attention to entity field lists, only painted fields. So if data in the entity is used but not displayed, that data is thrown away by doing this. 2. DTD creation doesn't allow for 'All fields' as a self maintaining concept, If I create this DTD now, and then later add a field to the model, I have to remember all the DTDs which are supposed to contain all the fields for this entity and go round and edit them manually, (and if you've used the default mapping facility adding a field to a DTD then names it using the 'wrong' entity.) Has anyone got any in house utilities which make the management of DTDs to share data between components less of an outright time consuming menace? Anyone up for a collaborative project? I currently have a form which will produce a default mapping between *FRM and *SSV subtypes or *FRM and main entities, which cuts down on trying to maintain the #defines set up by the component generator.

3 Comments

  1. Hi Iain, as usual since my dITo initiative, I am very interested in a collaborative project which supports these DTD utilities. Perhaps you can give me (mailto:ulrichmerkel@web.de) some more details about your construct. Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. I do something similar without DTD's. It does not keep the actual state of the records it just dumps or loads the data. So it depends on what you need. From component to file: Do a componettostruct and a structtoxml and save that with fiiledump. From file to component: Do a fileload, xmltostruct and structtocomponent.


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  3. Which will probably be great when I do manage to migrate to 9.5+ but I'm currently working in 9.3 whilst I troubleshoot in 9.5 for 6 months hence. Still, I'll definitely look at componenttostruct when 9.5/6 is in my sights.


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)