Class WSDL::XMLSchema::ComplexContent
In: lib/wsdl/xmlSchema/complexContent.rb
Parent: Info

Methods

Attributes

attributes  [R] 
base  [RW] 
content  [R] 
derivetype  [R] 

Public Class methods

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 23
23:   def initialize
24:     super
25:     @base = nil
26:     @derivetype = nil
27:     @content = nil
28:     @attributes = XSD::NamedElements.new
29:     @basetype = nil
30:   end

Public Instance methods

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 40
40:   def basetype
41:     @basetype ||= root.collect_complextypes[@base]
42:   end

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 36
36:   def elementformdefault
37:     parent.elementformdefault
38:   end

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 77
77:   def parse_attr(attr, value)
78:     if @derivetype.nil?
79:       return nil
80:     end
81:     case attr
82:     when BaseAttrName
83:       @base = value
84:     else
85:       nil
86:     end
87:   end

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 44
44:   def parse_element(element)
45:     case element
46:     when RestrictionName, ExtensionName
47:       @derivetype = element.name
48:       self
49:     when AllName
50:       if @derivetype.nil?
51:         raise Parser::ElementConstraintError.new("base attr not found.")
52:       end
53:       @content = All.new
54:       @content
55:     when SequenceName
56:       if @derivetype.nil?
57:         raise Parser::ElementConstraintError.new("base attr not found.")
58:       end
59:       @content = Sequence.new
60:       @content
61:     when ChoiceName
62:       if @derivetype.nil?
63:         raise Parser::ElementConstraintError.new("base attr not found.")
64:       end
65:       @content = Choice.new
66:       @content
67:     when AttributeName
68:       if @derivetype.nil?
69:         raise Parser::ElementConstraintError.new("base attr not found.")
70:       end
71:       o = Attribute.new
72:       @attributes << o
73:       o
74:     end
75:   end

[Source]

    # File lib/wsdl/xmlSchema/complexContent.rb, line 32
32:   def targetnamespace
33:     parent.targetnamespace
34:   end

[Validate]