I need to create an MDL file format converter (UML Rathional Rose diagrams) into a file of a specific structure. In my case, this is EKB (the structure description will be presented below). I tried to find an MDL file structure on the Internet, but I did not find anything sensible. Actually, I have two questions. What does the structure of the MDL file look like and where to start developing the converter, for I have little idea how to convert one structure to another.

EKB structure:

<Structure> <KnowledgeBase> <Name></Name> <ShortName></ShortName> <Kind></Kind> <Description></Description> <Vars></Vars> <Templates> //список шаблонов <Template> <ID></ID> //Π²Π½ΡƒΡ‚Ρ€Π΅Π½Π½ΠΈΠΉ ΠΈΠ΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ <Name></Name> //имя Π½Π° ΠΊΠΈΡ€ΠΈΠ»Π»ΠΈΡ†Π΅ <ShortName></ShortName> //имя Π½Π° Π»Π°Ρ‚ΠΈΠ½ΠΈΡ†Π΅ <Description></Description> //описаниС <PackageName></PackageName> <RootPackageName></RootPackageName> <Slots> //список слотов <Slot> //слот <Name></Name> <ShortName></ShortName> <Description></Description> <Value></Value> //Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ слота <DataType></DataType> //Ρ‚ΠΈΠΏ Π΄Π°Π½Π½Ρ‹Ρ… слота <Constraint></Constraint> //ΠΎΠ³Ρ€Π°Π½ΠΈΡ‡Π΅Π½ΠΈΠ΅ Π½Π° Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ (=,>,<) </Slot> </Slots> </Template> </Templates> <Facts> //список Ρ„Π°ΠΊΡ‚ΠΎΠ² <Fact> //Ρ„Π°ΠΊΡ‚ <ID></ID> <Name></Name> <ShortName></ShortName> <Mode></Mode> <PackageName></PackageName> <RootPackageName></RootPackageName> <Slots> <Slot> <Name></Name> <ShortName></ShortName> <Description></Description> <Value></Value> <DataType></DataType> <Constraint></Constraint> </Slot> </Slots> </Fact> </Facts> <GRules></GRules> <Rules> //список ΠΏΡ€Π°Π²ΠΈΠ» <Rule> //ΠΏΡ€Π°Π²ΠΈΠ»ΠΎ <ID></ID> <Name></Name> <ShortName></ShortName> <Description></Description> <Salience></Salience> //Π²Π°ΠΆΠ½ΠΎΡΡ‚ΡŒ ΠΏΡ€Π°Π²ΠΈΠ»Π° <PackageName></PackageName> <RootPackageName></RootPackageName> <Conditions> //список условий <Condition> //условиС <Name></Name> <Operator></Operator> //ΠΎΠΏΠ΅Ρ€Π°Ρ‚ΠΎΡ€ – and, or, not <Fact> <ID></ID> <Name></Name> <ShortName></ShortName> <Mode></Mode> <PackageName></PackageName> <RootPackageName></RootPackageName> <Slots> <Slot> <Name></Name> <ShortName></ShortName> <Description></Description> <Value></Value> <DataType></DataType> <Constraint></Constraint> </Slot> </Slots> </Fact> </Condition> </Conditions> <Actions> //список дСйствий <Action> //дСйствиС <Name></Name> <Operator></Operator> //ΠΎΠΏΠ΅Ρ€Π°Ρ‚ΠΎΡ€ – add, rem <Fact> <ID></ID> <Name></Name> <ShortName></ShortName> <Mode></Mode> <PackageName></PackageName> <RootPackageName></RootPackageName> <Slots> <Slot> <Name></Name> <ShortName></ShortName> <Description></Description> <Value></Value> <DataType></DataType> <Constraint></Constraint> </Slot> </Slots> </Fact> </Action> </Actions> </Rule> </Rules> <Functions></Functions> <Tasks></Tasks> <TempPackageList></TempPackageList> <FactPackageList></FactPackageList> <RulePackageList></RulePackageList> <GRulePackageList></GRulePackageList> </KnowledgeBase> </Structure> 
  • one
    There are two options in my opinion. 1) Deserialization - Serialization. 2) xsl + xpath request. Depending on the language and the task, this or that implementation. Well, as the third option - you can parse the file with the xml parser, it is possible and the very simple. - nick_n_a
  • one
    MDL (Rathional Rose) - Isn't it a proprietary format? - Sublihim
  • Reversing the MDL format will have to be done for sure. Long, expensive, difficult. As a result - not necessary. - Vladimir Martyanov

0