Class: WSDL::XMLSchema::ComplexContent
- Defined in:
- lib/wsdl/xmlSchema/complexContent.rb
Instance Attribute Summary collapse
- 
  
    
      #attributes  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute attributes. 
- 
  
    
      #base  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute base. 
- 
  
    
      #content  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute content. 
- 
  
    
      #derivetype  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute derivetype. 
Attributes inherited from Info
Instance Method Summary collapse
- #basetype ⇒ Object
- #elementformdefault ⇒ Object
- 
  
    
      #initialize  ⇒ ComplexContent 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ComplexContent. 
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
- #targetnamespace ⇒ Object
Methods inherited from Info
Constructor Details
#initialize ⇒ ComplexContent
Returns a new instance of ComplexContent.
| 23 24 25 26 27 28 29 30 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 23 def initialize super @base = nil @derivetype = nil @content = nil @attributes = XSD::NamedElements.new @basetype = nil end | 
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
| 21 22 23 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 21 def attributes @attributes end | 
#base ⇒ Object
Returns the value of attribute base.
| 18 19 20 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 18 def base @base end | 
#content ⇒ Object (readonly)
Returns the value of attribute content.
| 20 21 22 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 20 def content @content end | 
#derivetype ⇒ Object (readonly)
Returns the value of attribute derivetype.
| 19 20 21 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 19 def derivetype @derivetype end | 
Instance Method Details
#basetype ⇒ Object
| 40 41 42 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 40 def basetype @basetype ||= root.collect_complextypes[@base] end | 
#elementformdefault ⇒ Object
| 36 37 38 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 36 def elementformdefault parent.elementformdefault end | 
#parse_attr(attr, value) ⇒ Object
| 77 78 79 80 81 82 83 84 85 86 87 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 77 def parse_attr(attr, value) if @derivetype.nil? return nil end case attr when BaseAttrName @base = value else nil end end | 
#parse_element(element) ⇒ Object
| 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 44 def parse_element(element) case element when RestrictionName, ExtensionName @derivetype = element.name self when AllName if @derivetype.nil? raise Parser::ElementConstraintError.new("base attr not found.") end @content = All.new @content when SequenceName if @derivetype.nil? raise Parser::ElementConstraintError.new("base attr not found.") end @content = Sequence.new @content when ChoiceName if @derivetype.nil? raise Parser::ElementConstraintError.new("base attr not found.") end @content = Choice.new @content when AttributeName if @derivetype.nil? raise Parser::ElementConstraintError.new("base attr not found.") end o = Attribute.new @attributes << o o end end | 
#targetnamespace ⇒ Object
| 32 33 34 | # File 'lib/wsdl/xmlSchema/complexContent.rb', line 32 def targetnamespace parent.targetnamespace end |