On Feb 26, 3:15 pm, derwisch <[EMAIL PROTECTED]> wrote: > I am trying to write an editor for the CDISC Operational Data Model > (http://www.cdisc.org/models/odm/v1.2/ODM1-2-0.html), which is > conceived for the recording of data for clinical trials. As some of > the data fields will be reused (such as a lab measurement pre and post > treatment; you don't want to redefine the lab measurement between > timepoints), the strict tree hierarchy of XML is broken by introducing > Object IDs which can be referenced from elsewhere: ItemRef elements > can sit within ItemGroupDef elements and point to ItemDef elements > sitting elsewhere.
> This is a 1:1-correspondence to the DAG structure found in Leo. Unlikely. And even if true, it is misleading. > Therefore, simplifying the node concept in Leo would have me up in arms. There is a much easier way, one that sidesteps the uA issue, and is more Leonine. I'm not sure exactly what the way is, but I now for the sure it exists :-) The general form of the solution would be: - Use a high-level tool such as ElementTree to massage the input data into a Python data structure. - Map that data structure into a Leo outline. The essence of your problem is that some parts of data are shared, and other aren't. Well, you don't have to cram all the data into a single Leo node, regardless of whether we are talking about the old world or the new world. Instead, create "trial nodes" with children. Some of those children will be clones, and therefore shared. Other children will be unique. This kind of problem is very easily solved in Leo. Your task is to write a script to convert the input data into Leo outline that uses clones properly. You can prototype a node structure by hand. Try it, you'll see it's much easier than you imagine. To put it another way: your Leo outline doesn't have to slavishly mirror the format of the .xml file: scripts (or commands created by @button or @command nodes) can read and write the .xml file from whatever Leo outline you please. HTH. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
