summaryrefslogtreecommitdiff
path: root/lib/xsd/qname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xsd/qname.rb')
-rw-r--r--lib/xsd/qname.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/xsd/qname.rb b/lib/xsd/qname.rb
index 9dce1340f8..7185fedf2d 100644
--- a/lib/xsd/qname.rb
+++ b/lib/xsd/qname.rb
@@ -1,5 +1,5 @@
# XSD4R - XML QName definition.
-# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
+# 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;
@@ -19,7 +19,7 @@ class QName
end
def dup_name(name)
- self.class.new(@namespace, name)
+ ::XSD::QName.new(@namespace, name)
end
def match(rhs)
@@ -55,6 +55,11 @@ class QName
"{#{ namespace }}#{ name }"
end
+ def inspect
+ sprintf("#<%s:0x%x %s>", self.class.name, __id__,
+ "{#{ namespace }}#{ name }")
+ end
+
NormalizedNameRegexp = /^\{([^}]*)\}(.*)$/
def parse(str)
NormalizedNameRegexp =~ str