source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/wsdl/xmlSchema/simpleExtension.rb@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 938 bytes
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
9require 'wsdl/info'
10require 'xsd/namedelements'
11
12
13module WSDL
14module XMLSchema
15
16
17class 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
50end
51
52
53end
54end
Note: See TracBrowser for help on using the repository browser.