Class WSDL::XMLSchema::SimpleContent
In: lib/wsdl/xmlSchema/simpleContent.rb
Parent: Info

Methods

Attributes

extension  [R] 
restriction  [R] 

Public Class methods

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 25
25:   def initialize
26:     super
27:     @restriction = nil
28:     @extension = nil
29:   end

Public Instance methods

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 31
31:   def base
32:     content.base
33:   end

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 21
21:   def check_lexical_format(value)
22:     check(value)
23:   end

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 39
39:   def parse_element(element)
40:     case element
41:     when RestrictionName
42:       @restriction = SimpleRestriction.new
43:       @restriction
44:     when ExtensionName
45:       @extension = SimpleExtension.new
46:       @extension
47:     end
48:   end

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 35
35:   def targetnamespace
36:     parent.targetnamespace
37:   end

Private Instance methods

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 56
56:   def check(value)
57:     unless content.valid?(value)
58:       raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
59:     end
60:   end

[Source]

    # File lib/wsdl/xmlSchema/simpleContent.rb, line 52
52:   def content
53:     @restriction || @extension
54:   end

[Validate]