1
# WSDL4R - XMLSchema complexContent definition for WSDL.
2
# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
4
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
5
# redistribute it and/or modify it under the same terms of Ruby's license;
6
# either the dual license version in 2003, or any later version.
10
require 'xsd/namedelements'
17
class ComplexContent < Info
19
attr_reader :derivetype
21
attr_reader :attributes
28
@attributes = XSD::NamedElements.new
33
parent.targetnamespace
36
def elementformdefault
37
parent.elementformdefault
41
@basetype ||= root.collect_complextypes[@base]
44
def parse_element(element)
46
when RestrictionName, ExtensionName
47
@derivetype = element.name
51
raise Parser::ElementConstraintError.new("base attr not found.")
57
raise Parser::ElementConstraintError.new("base attr not found.")
59
@content = Sequence.new
63
raise Parser::ElementConstraintError.new("base attr not found.")
69
raise Parser::ElementConstraintError.new("base attr not found.")
77
def parse_attr(attr, value)