Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/branches/1_5/lib/wsdl/xmlSchema/any.rb

Revision 1824, 1.2 kB (checked in by nahi, 2 years ago)
  • Copyright notice updated. add '2000-2007' uniformly.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - XMLSchema any definition for WSDL.
2 # Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
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 Any < Info
17   attr_accessor :maxoccurs
18   attr_accessor :minoccurs
19   attr_accessor :namespace
20   attr_accessor :process_contents
21
22   def initialize
23     super()
24     @maxoccurs = 1
25     @minoccurs = 1
26     @namespace = '##any'
27     @process_contents = 'strict'
28   end
29
30   def targetnamespace
31     parent.targetnamespace
32   end
33
34   def parse_element(element)
35     nil
36   end
37
38   def parse_attr(attr, value)
39     case attr
40     when MaxOccursAttrName
41       if value.source == 'unbounded'
42         @maxoccurs = nil
43       else
44         @maxoccurs = Integer(value.source)
45       end
46       value.source
47     when MinOccursAttrName
48       @minoccurs = Integer(value.source)
49     when NamespaceAttrName
50       @namespace = value.source
51     when ProcessContentsAttrName
52       @process_contents = value.source
53     else
54       nil
55     end
56   end
57 end
58
59
60 end
61 end
Note: See TracBrowser for help on using the browser.