diff options
| author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 08:14:57 +0000 |
|---|---|---|
| committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 08:14:57 +0000 |
| commit | 0eb20dc9b41da71b51540f75cfe955ed71420915 (patch) | |
| tree | 6c16302232c2b655cfd5ea406a9ac202814a8b35 /lib/xsd/qname.rb | |
| parent | f54f1ce821930931cf490d6c7ac8f3f12baec3a1 (diff) | |
| download | ruby-0eb20dc9b41da71b51540f75cfe955ed71420915.tar.gz ruby-0eb20dc9b41da71b51540f75cfe955ed71420915.tar.xz ruby-0eb20dc9b41da71b51540f75cfe955ed71420915.zip | |
Mon Dec 24 17:06:37 2007 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* {lib,test}/{soap,wsdl,xsd}: removed soap4r along to the discussion
at ruby-core and ruby-dev. see [ruby-core:12535], [ruby-dev:31969].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xsd/qname.rb')
| -rw-r--r-- | lib/xsd/qname.rb | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/lib/xsd/qname.rb b/lib/xsd/qname.rb deleted file mode 100644 index bb9763a69..000000000 --- a/lib/xsd/qname.rb +++ /dev/null @@ -1,78 +0,0 @@ -# XSD4R - XML QName definition. -# Copyright (C) 2002, 2003, 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>. - -# This program is copyrighted free software by NAKAMURA, Hiroshi. You can -# redistribute it and/or modify it under the same terms of Ruby's license; -# either the dual license version in 2003, or any later version. - - -module XSD - - -class QName - attr_accessor :namespace - attr_accessor :name - attr_accessor :source - - def initialize(namespace = nil, name = nil) - @namespace = namespace - @name = name - @source = nil - end - - def dup_name(name) - XSD::QName.new(@namespace, name) - end - - def dump - ns = @namespace.nil? ? 'nil' : @namespace.dump - name = @name.nil? ? 'nil' : @name.dump - "XSD::QName.new(#{ns}, #{name})" - end - - def match(rhs) - if rhs.namespace and (rhs.namespace != @namespace) - return false - end - if rhs.name and (rhs.name != @name) - return false - end - true - end - - def ==(rhs) - !rhs.nil? and @namespace == rhs.namespace and @name == rhs.name - end - - def ===(rhs) - (self == rhs) - end - - def eql?(rhs) - (self == rhs) - end - - def hash - @namespace.hash ^ @name.hash - end - - def to_s - "{#{ namespace }}#{ name }" - end - - def inspect - sprintf("#<%s:0x%x %s>", self.class.name, __id__, - "{#{ namespace }}#{ name }") - end - - NormalizedNameRegexp = /^\{([^}]*)\}(.*)$/ - def parse(str) - NormalizedNameRegexp =~ str - self.new($1, $2) - end - - EMPTY = QName.new.freeze -end - - -end |
