Line | |
---|
1 | # WSDL4R - XMLSchema simpleType extension definition for WSDL.
|
---|
2 | # Copyright (C) 2005 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 | require 'xsd/namedelements'
|
---|
11 |
|
---|
12 |
|
---|
13 | module WSDL
|
---|
14 | module XMLSchema
|
---|
15 |
|
---|
16 |
|
---|
17 | class SimpleExtension < Info
|
---|
18 | attr_reader :base
|
---|
19 | attr_reader :attributes
|
---|
20 |
|
---|
21 | def initialize
|
---|
22 | super
|
---|
23 | @base = nil
|
---|
24 | @attributes = XSD::NamedElements.new
|
---|
25 | end
|
---|
26 |
|
---|
27 | def targetnamespace
|
---|
28 | parent.targetnamespace
|
---|
29 | end
|
---|
30 |
|
---|
31 | def valid?(value)
|
---|
32 | true
|
---|
33 | end
|
---|
34 |
|
---|
35 | def parse_element(element)
|
---|
36 | case element
|
---|
37 | when AttributeName
|
---|
38 | o = Attribute.new
|
---|
39 | @attributes << o
|
---|
40 | o
|
---|
41 | end
|
---|
42 | end
|
---|
43 |
|
---|
44 | def parse_attr(attr, value)
|
---|
45 | case attr
|
---|
46 | when BaseAttrName
|
---|
47 | @base = value
|
---|
48 | end
|
---|
49 | end
|
---|
50 | end
|
---|
51 |
|
---|
52 |
|
---|
53 | end
|
---|
54 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.