summaryrefslogtreecommitdiff
path: root/lib/wsdl/definitions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wsdl/definitions.rb')
-rw-r--r--lib/wsdl/definitions.rb26
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/wsdl/definitions.rb b/lib/wsdl/definitions.rb
index a7c71f2a93..5235037cfe 100644
--- a/lib/wsdl/definitions.rb
+++ b/lib/wsdl/definitions.rb
@@ -18,19 +18,16 @@ class Definitions < Info
attr_reader :targetnamespace
attr_reader :imports
- # Overrides Info#root
- def root
- @root
- end
-
- def root=(root)
- @root = root
- end
+ attr_accessor :location
+ attr_reader :importedschema
def initialize
super
@name = nil
@targetnamespace = nil
+ @location = nil
+ @importedschema = {}
+
@types = nil
@imports = []
@messages = XSD::NamedElements.new
@@ -53,6 +50,19 @@ class Definitions < Info
end
end
+ def collect_attributes
+ result = XSD::NamedElements.new
+ if @types
+ @types.schemas.each do |schema|
+ result.concat(schema.collect_attributes)
+ end
+ end
+ @imports.each do |import|
+ result.concat(import.content.collect_attributes)
+ end
+ result
+ end
+
def collect_elements
result = XSD::NamedElements.new
if @types