Changeset 1475
- Timestamp:
- 04/15/05 11:43:54 (4 years ago)
- Files:
-
- trunk/lib/wsdl/xmlSchema/import.rb (modified) (5 diffs)
- trunk/lib/wsdl/xmlSchema/schema.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/wsdl/xmlSchema/import.rb
r1369 r1475 1 1 # WSDL4R - XMLSchema import definition. 2 # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.2 # Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>. 3 3 4 4 # This program is copyrighted free software by NAKAMURA, Hiroshi. You can … … 8 8 9 9 require 'wsdl/info' 10 require 'wsdl/xmlSchema/importer' 10 11 11 12 … … 17 18 attr_reader :namespace 18 19 attr_reader :schemalocation 20 attr_reader :content 19 21 20 22 def initialize … … 22 24 @namespace = nil 23 25 @schemalocation = nil 26 @content = nil 24 27 end 25 28 … … 34 37 when SchemaLocationAttrName 35 38 @schemalocation = value.source 39 @content = import(@schemalocation) 40 @schemalocation 36 41 else 37 42 nil 38 43 end 44 end 45 46 private 47 48 def import(location) 49 Importer.import(location) 39 50 end 40 51 end trunk/lib/wsdl/xmlSchema/schema.rb
r1430 r1475 80 80 result = XSD::NamedElements.new 81 81 result.concat(@attributes) 82 @imports.each do |import| 83 result.concat(import.content.collect_attributes) if import.content 84 end 82 85 result 83 86 end … … 86 89 result = XSD::NamedElements.new 87 90 result.concat(@elements) 91 @imports.each do |import| 92 result.concat(import.content.collect_elements) if import.content 93 end 88 94 result 89 95 end … … 92 98 result = XSD::NamedElements.new 93 99 result.concat(@complextypes) 100 @imports.each do |import| 101 result.concat(import.content.collect_complextypes) if import.content 102 end 94 103 result 95 104 end … … 98 107 result = XSD::NamedElements.new 99 108 result.concat(@simpletypes) 109 @imports.each do |import| 110 result.concat(import.content.collect_simpletypes) if import.content 111 end 100 112 result 101 113 end