Class: WSDL::XMLSchema::Import
- Defined in:
- lib/wsdl/xmlSchema/import.rb
Instance Attribute Summary collapse
- 
  
    
      #content  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute content. 
- 
  
    
      #namespace  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute namespace. 
- 
  
    
      #schemalocation  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute schemalocation. 
Attributes inherited from Info
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ Import 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Import. 
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
Methods inherited from Info
Constructor Details
#initialize ⇒ Import
Returns a new instance of Import.
| 22 23 24 25 26 27 | # File 'lib/wsdl/xmlSchema/import.rb', line 22 def initialize super @namespace = nil @schemalocation = nil @content = nil end | 
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
| 20 21 22 | # File 'lib/wsdl/xmlSchema/import.rb', line 20 def content @content end | 
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
| 18 19 20 | # File 'lib/wsdl/xmlSchema/import.rb', line 18 def namespace @namespace end | 
#schemalocation ⇒ Object (readonly)
Returns the value of attribute schemalocation.
| 19 20 21 | # File 'lib/wsdl/xmlSchema/import.rb', line 19 def schemalocation @schemalocation end | 
Instance Method Details
#parse_attr(attr, value) ⇒ Object
| 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # File 'lib/wsdl/xmlSchema/import.rb', line 33 def parse_attr(attr, value) case attr when NamespaceAttrName @namespace = value.source when SchemaLocationAttrName @schemalocation = URI.parse(value.source) 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 = import(@schemalocation) root.importedschema[@schemalocation] = @content end @schemalocation else nil end end | 
#parse_element(element) ⇒ Object
| 29 30 31 | # File 'lib/wsdl/xmlSchema/import.rb', line 29 def parse_element(element) nil end |