From b9c847257eb27a4c2ad8c6ca457d23b514052d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Doser?= Date: Wed, 21 Sep 2005 14:47:17 +0000 Subject: [PATCH] parse Interfaces as interfaces, not as primitive types git-svn-id: https://projects.brucker.ch/su4sml/svn/infsec-import/trunk/src/su4sml@3109 3260e6d1-4efc-4170-b0a7-36055960796d --- src/xml2xmi.sml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/xml2xmi.sml b/src/xml2xmi.sml index 7ad371e..89d5178 100644 --- a/src/xml2xmi.sml +++ b/src/xml2xmi.sml @@ -594,21 +594,19 @@ fun mkClassifier tree = val atts = XmlTree.attributes_of tree val trees = XmlTree.node_children_of tree in - if elem = "UML:Class" orelse - elem = "UML:AssociationClass" then mkClass atts trees - else if elem = "UML:Interface" orelse (* FIX: use a custom mkInterface *) - elem = "UML:DataType" orelse - elem = "UML:Primitive" then mkPrimitive atts trees - else if elem = "UML:Enumeration" then mkEnumeration atts trees - else if elem = "UML15OCL.Types.VoidType" then mkVoid atts trees - else if elem = "UML15OCL.Types.CollectionType" then - mkCollection atts trees - else if elem = "UML15OCL.Types.SequenceType" then mkSequence atts trees - else if elem = "UML15OCL.Types.SetType" then mkSet atts trees - else if elem = "UML15OCL.Types.BagType" then mkBag atts trees - else if elem = "UML15OCL.Types.OrderedSetType" then - mkOrderedSet atts trees - else raise IllFormed ("in mkClassifier: found unexpected element "^elem) + case elem of "UML:Class" => mkClass atts trees + | "UML:AssociationClass" => mkClass atts trees + | "UML:Interface" => mkInterface atts trees + | "UML:DataType" => mkPrimitive atts trees + | "UML:Primitive" => mkPrimitive atts trees + | "UML:Enumeration" => mkEnumeration atts trees + | "UML15OCL.Types.VoidType" => mkVoid atts trees + | "UML15OCL.Types.CollectionType" => mkCollection atts trees + | "UML15OCL.Types.SequenceType" => mkSequence atts trees + | "UML15OCL.Types.SetType" => mkSet atts trees + | "UML15OCL.Types.BagType" => mkBag atts trees + | "UML15OCL.Types.OrderedSetType" => mkOrderedSet atts trees + | _ => raise IllFormed ("in mkClassifier: found unexpected element "^elem) end