Class: Sekken::XS::Extension

Inherits:
BaseType show all
Defined in:
lib/sekken/xs/types.rb

Instance Attribute Summary

Attributes inherited from BaseType

#node

Instance Method Summary collapse

Methods inherited from BaseType

#[], #children, #collect_attributes, #empty?, #initialize, #inspect

Constructor Details

This class inherits a constructor from Sekken::XS::BaseType

Instance Method Details

#collect_child_elements(memo = []) ⇒ Object



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/sekken/xs/types.rb', line 132

def collect_child_elements(memo = [])
  if @node['base']
    local, nsid = @node['base'].split(':').reverse
    namespace = @node.namespaces["xmlns:#{nsid}"]

    if complex_type = @schemas.complex_type(namespace, local)
      memo += complex_type.elements

    # TODO: can we find a testcase for this?
    else #if simple_type = @schemas.simple_type(namespace, local)
      raise 'simple type extension?!'
      #memo << simple_type
    end
  end

  super
end