Line | |
---|
1 | # WSDL4R - XMLSchema complexType definition for WSDL.
|
---|
2 | # Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>.
|
---|
3 |
|
---|
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.
|
---|
7 |
|
---|
8 |
|
---|
9 | require 'wsdl/info'
|
---|
10 |
|
---|
11 |
|
---|
12 | module WSDL
|
---|
13 | module XMLSchema
|
---|
14 |
|
---|
15 |
|
---|
16 | class All < Info
|
---|
17 | attr_reader :minoccurs
|
---|
18 | attr_reader :maxoccurs
|
---|
19 | attr_reader :elements
|
---|
20 |
|
---|
21 | def initialize
|
---|
22 | super()
|
---|
23 | @minoccurs = '1'
|
---|
24 | @maxoccurs = '1'
|
---|
25 | @elements = []
|
---|
26 | end
|
---|
27 |
|
---|
28 | def targetnamespace
|
---|
29 | parent.targetnamespace
|
---|
30 | end
|
---|
31 |
|
---|
32 | def elementformdefault
|
---|
33 | parent.elementformdefault
|
---|
34 | end
|
---|
35 |
|
---|
36 | def <<(element)
|
---|
37 | @elements << element
|
---|
38 | end
|
---|
39 |
|
---|
40 | def parse_element(element)
|
---|
41 | case element
|
---|
42 | when AnyName
|
---|
43 | o = Any.new
|
---|
44 | @elements << o
|
---|
45 | o
|
---|
46 | when ElementName
|
---|
47 | o = Element.new
|
---|
48 | @elements << o
|
---|
49 | o
|
---|
50 | else
|
---|
51 | nil
|
---|
52 | end
|
---|
53 | end
|
---|
54 |
|
---|
55 | def parse_attr(attr, value)
|
---|
56 | case attr
|
---|
57 | when MaxOccursAttrName
|
---|
58 | @maxoccurs = value.source
|
---|
59 | when MinOccursAttrName
|
---|
60 | @minoccurs = value.source
|
---|
61 | else
|
---|
62 | nil
|
---|
63 | end
|
---|
64 | end
|
---|
65 | end
|
---|
66 |
|
---|
67 |
|
---|
68 | end
|
---|
69 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.