Class: WSDL::XMLSchema::ImportHandler
- Defined in:
- lib/wsdl/xmlSchema/importHandler.rb
Instance Attribute Summary collapse
- 
  
    
      #content  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute content. 
- 
  
    
      #schemalocation  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute schemalocation. 
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ ImportHandler 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ImportHandler. 
- #parse_schemalocation(location, root, parent) ⇒ Object
Constructor Details
#initialize ⇒ ImportHandler
Returns a new instance of ImportHandler.
| 21 22 23 24 | # File 'lib/wsdl/xmlSchema/importHandler.rb', line 21 def initialize @schemalocation = nil @content = nil end | 
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
| 19 20 21 | # File 'lib/wsdl/xmlSchema/importHandler.rb', line 19 def content @content end | 
#schemalocation ⇒ Object (readonly)
Returns the value of attribute schemalocation.
| 18 19 20 | # File 'lib/wsdl/xmlSchema/importHandler.rb', line 18 def schemalocation @schemalocation end | 
Instance Method Details
#parse_schemalocation(location, root, parent) ⇒ Object
| 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # File 'lib/wsdl/xmlSchema/importHandler.rb', line 26 def parse_schemalocation(location, root, parent) @schemalocation = URI.parse(location) if @schemalocation.relative? and !parent.location.nil? and !parent.location.relative? @schemalocation = parent.location + @schemalocation end if root.importedschema.key?(@schemalocation) @content = root.importedschema[@schemalocation] else root.importedschema[@schemalocation] = nil # placeholder @content = Importer.import(@schemalocation, root) root.importedschema[@schemalocation] = @content end @schemalocation end |