PageRenderTime 57ms CodeModel.GetById 53ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/wsdl/xmlSchema/any.rb

http://github.com/agross/netopenspace
Ruby | 56 lines | 38 code | 13 blank | 5 comment | 0 complexity | ed879646d768ca409cf0c01773061bde MD5 | raw file
 1# WSDL4R - XMLSchema any definition for WSDL.
 2# Copyright (C) 2003  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
 9require 'wsdl/info'
10
11
12module WSDL
13module XMLSchema
14
15
16class 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      @maxoccurs = value.source
42    when MinOccursAttrName
43      @minoccurs = value.source
44    when NamespaceAttrName
45      @namespace = value.source
46    when ProcessContentsAttrName
47      @process_contents = value.source
48    else
49      nil
50    end
51  end
52end
53
54
55end
56end