Hi Younian: Very good project! You can write a class dictionary in a style that it defines a markup language. Those class dictioanries can be easily transformed into a DTD of XML, I think. You can also take an arbitrary class dictionary, generate the Java classes for it and then copy the generated PrintVisitor into MarkUpPrintVisitor which you modify so that the objects are printed in markup style. Or it might be easier to modify the cd to markup style: A = "(" B "." C ")". B = Ident. C = String. becomes: A = "" B C "". B = "" Ident "". C = "" String "". and you generate a print visitor which you implant into the original Java classes. -- Karl >From Younian_Zhang@infinium.com Mon Nov 9 15:57:42 1998 > > >Professor, > >I am considering apply the Adaptive Methods to the works at my hands. >We have an accounting software product. Its business logic is dictated by a >Rules Base. Many behaviors of the accounting software, such as UI, Account >type, Posting type, etc., can be defined or customized by modifying the >Rules Base. Any change on Rules Base will ends up changing the relational >database either in contents or schema, or selecting a core program that >associated to a UI element. My company constantly supporting the installed >accounting systems at the customer sites by shipping them the latest >version of the Rules Base. However, the customers are also allowed to >change the Rule Base to meet their special requirements. The problem arose >when the changes made by a customer in the Rules Base and the changes made >by the upgrade version may be in conflict. If there is a conflict, a >customer needs to be warned and makes decision to resolve the conflict. > >Systemically keeping track of the changes is critical to the Rules Base >maintenance. A change normally takes several steps and affects different >aspects of the accounting system. I am proposing to use a script to >specify changes. The accounting system will run the script to perform a >change. Two scripts can therefore be compared to see if there is a conflict >instead of looking into the places scattered in database. Ideally, a script >should be reversible thus all its specified actions may be undone to >recover to earlier stage. > >I think my challenge is to write syntax of such a script and be able to >perform some actions to the parsed script objects. The actions may include: >1. Whether two scripts try to define a same business object in different >way (conflict) >2. Focus on a specific business object and lookup several scripts object >to list all the changes on that object in a chronological way. >3. I think a mark up language like syntax will be good for my purpose. So >I wonder if there is a way that I can easily transfer my class dictionary >to a DTD of XML. > >Younian