IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope: Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  XML  >

XMI and UML combine to drive product development

Ideogramic suite demonstrates UML-oriented XML processing

developerWorks

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

    关于 IBM 隐私条约 联系 IBM 使用条款