diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 14:41:10 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 14:41:10 +0000 |
commit | e8ed175fe02aecab21ce50e85e27fe79137d8c31 (patch) | |
tree | 8a6d14560604b592f177ffaaa0c146c756edb2e9 /lib/wsdl/xmlSchema/parser.rb | |
parent | 330a8e51c56f5386753f55ba8e656a62471a36ba (diff) |
* added files:
* lib/soap/mapping/wsdl*.rb
* lib/wsdl/soap/element.rb
* lib/wsdl/xmlSchema/simpleContent.rb
* modified files:
* lib/soap/*
* lib/wsdl/*
* lib/xsd/*
* test/soap/*
* test/wsdl/*
* test/xsd/*
* sample/soap/*
* sample/sdl/*
* summary
* imported from the soap4r repository. Version: 1.5.3-ruby1.8.2
* added several XSD basetype support: nonPositiveInteger,
negativeInteger, nonNegativeInteger, unsignedLong, unsignedInt,
unsignedShort, unsignedByte, positiveInteger
* HTTP client connection/send/receive timeout support.
* HTTP client/server gzipped content encoding support.
* improved WSDL schema definition support; still is far from
complete, but is making step by step improovement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/wsdl/xmlSchema/parser.rb')
-rw-r--r-- | lib/wsdl/xmlSchema/parser.rb | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/lib/wsdl/xmlSchema/parser.rb b/lib/wsdl/xmlSchema/parser.rb index 5401c5f729..a7f1c29fd4 100644 --- a/lib/wsdl/xmlSchema/parser.rb +++ b/lib/wsdl/xmlSchema/parser.rb @@ -22,7 +22,7 @@ class Parser include XSD class ParseError < Error; end - class FormatDecodeError < Error; end + class FormatDecodeError < ParseError; end class UnknownElementError < FormatDecodeError; end class UnknownAttributeError < FormatDecodeError; end class UnexpectedElementError < FormatDecodeError; end @@ -114,34 +114,21 @@ private else o = parent.parse_element(element) unless o - raise UnknownElementError.new("Unknown element #{ element }.") + STDERR.puts("Unknown element #{ element }.") + o = Documentation.new # which accepts any element. end # node could be a pseudo element. pseudo element has its own parent. o.parent = parent if o.parent.nil? end attrs.each do |key, value| - attr = unless /:/ =~ key - XSD::QName.new(nil, key) - else - ns.parse(key) - end - value_ele = if /:/ !~ value - value - elsif /^http:\/\// =~ value # ToDo: ugly. - value - else - begin - ns.parse(value) - rescue - value - end - end - if attr == IdAttrName + attr_ele = ns.parse(key, true) + value_ele = ns.parse(value, true) + value_ele.source = value # for recovery; value may not be a QName + if attr_ele == IdAttrName o.id = value_ele else - unless o.parse_attr(attr, value_ele) - STDERR.puts("Unknown attr #{ attr }.") - # raise UnknownAttributeError.new("Unknown attr #{ attr }.") + unless o.parse_attr(attr_ele, value_ele) + STDERR.puts("Unknown attr #{ attr_ele }.") end end end |