Skip to main content

XMI and UML combine to drive product development

Ideogramic suite demonstrates UML-oriented XML processing

Return to article


Listing 2. ModelLoader source

        # - Classifier tags
        body ModelLoader::loadClassifierTags {tag element} {
            loadNamespaceTags $tag $element
            loadGeneralizableElementTags $tag $element

            # ...

            ::DOM::scanChildren $tag {
                "Foundation.Core.Classifier.feature" {
                    ::DOM::scanChildren $node {
                        "Foundation.Core.Attribute" {
                            $element addAttribute [loadAttribute $node]
                        }
                        "Foundation.Core.Operation" {
                            $element addOperation [loadOperation $node]
                        }
                        default {
                            $loader warn "Unknown type of feature
([$node nodeName])\n"
                        }
                    }
                }
            }

            set currentNamespace $oldNamespace
        }
        # - Class tags
        body ModelLoader::loadClassTags {tag element} {
            loadClassifierTags $tag $element
            ::DOM::scanChildren $tag {
                "Foundation.Core.Class.isActive" {
                    $element configure -isActive [oneZero [$node getAttribute
        "xmi.value"]]
                }
            }
        }


Return to article