Class WSDL::XMLSchema::Import
In: lib/wsdl/xmlSchema/import.rb
Parent: Info

Methods

Attributes

content  [R] 
namespace  [R] 
schemalocation  [R] 

Public Class methods

[Source]

    # File lib/wsdl/xmlSchema/import.rb, line 22
22:   def initialize
23:     super
24:     @namespace = nil
25:     @schemalocation = nil
26:     @content = nil
27:   end

Public Instance methods

[Source]

    # File lib/wsdl/xmlSchema/import.rb, line 33
33:   def parse_attr(attr, value)
34:     case attr
35:     when NamespaceAttrName
36:       @namespace = value.source
37:     when SchemaLocationAttrName
38:       @schemalocation = URI.parse(value.source)
39:       if @schemalocation.relative? and !parent.location.nil? and
40:           !parent.location.relative?
41:         @schemalocation = parent.location + @schemalocation
42:       end
43:       if root.importedschema.key?(@schemalocation)
44:         @content = root.importedschema[@schemalocation]
45:       else
46:         root.importedschema[@schemalocation] = nil      # placeholder
47:         @content = import(@schemalocation)
48:         root.importedschema[@schemalocation] = @content
49:       end
50:       @schemalocation
51:     else
52:       nil
53:     end
54:   end

[Source]

    # File lib/wsdl/xmlSchema/import.rb, line 29
29:   def parse_element(element)
30:     nil
31:   end

Private Instance methods

[Source]

    # File lib/wsdl/xmlSchema/import.rb, line 58
58:   def import(location)
59:     Importer.import(location, root)
60:   end

[Validate]