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

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

Revision 1904, 0.9 kB (checked in by nahi, 1 year ago)
  • added anyAttribute support. (just ignore anyAttribute because wsdll2ruby.rb now generates xmlattr method. use it for adding any attribute.) closes #390.
Line 
1 # WSDL4R - XMLSchema anyAttribute 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 AnyAttribute < Info
17   attr_accessor :namespace
18   attr_accessor :processcontents
19
20   def initialize
21     super()
22     @namespace = '##any'
23     @processcontents = 'strict'
24   end
25
26   def targetnamespace
27     parent.targetnamespace
28   end
29
30   def parse_element(element)
31     nil
32   end
33
34   def parse_attr(attr, value)
35     case attr
36     when NamespaceAttrName
37       @namespace = value.source
38     when ProcessContentsAttrName
39       @processcontents = value.source
40     else
41       nil
42     end
43   end
44 end
45
46
47 end
48 end
Note: See TracBrowser for help on using the browser.