WSDL::XMLSchema::Schema (Class)

In: wsdl/xmlSchema/schema.rb
Parent: Info

Attributes

attributeformdefault  [RW] 
attributes  [R] 
complextypes  [R] 
elementformdefault  [RW] 
elements  [R] 
imports  [R] 
targetnamespace  [R] 

Public Class methods

[Source]

# File wsdl/xmlSchema/schema.rb, line 26
  def initialize
    super
    @targetnamespace = nil
    @complextypes = XSD::NamedElements.new
    @elements = XSD::NamedElements.new
    @attributes = XSD::NamedElements.new
    @imports = []
    @elementformdefault = nil
  end

[Source]

# File wsdl/xmlSchema/schema.rb, line 86
  def self.parse_element(element)
    if element == SchemaName
      Schema.new
    else
      nil
    end
  end

Public Instance methods

[Source]

# File wsdl/xmlSchema/schema.rb, line 80
  def collect_complextypes
    result = XSD::NamedElements.new
    result.concat(@complextypes)
    result
  end

[Source]

# File wsdl/xmlSchema/schema.rb, line 74
  def collect_elements
    result = XSD::NamedElements.new
    result.concat(@elements)
    result
  end

[Source]

# File wsdl/xmlSchema/schema.rb, line 61
  def parse_attr(attr, value)
    case attr
    when TargetNamespaceAttrName
      @targetnamespace = value
    when AttributeFormDefaultAttrName
      @attributeformdefault = value
    when ElementFormDefaultAttrName
      @elementformdefault = value
    else
      nil
    end
  end

[Source]

# File wsdl/xmlSchema/schema.rb, line 36
  def parse_element(element)
    case element
    when ImportName
      o = Import.new
      @imports << o
      o
    when ComplexTypeName
      o = ComplexType.new
      @complextypes << o
      o
    when SimpleTypeName
      STDERR.puts("Restriction of basetype with simpleType definition is ignored for now.")
      nil
    when ElementName
      o = Element.new
      @elements << o
      o
    when AttributeName
      o = Attribute.new
      o
    else
      nil
    end
  end

[Validate]