Use namespace_name in Attribute#to_xml
Instead of using `namespace.name` lets just use `namespace_name`. This fixes the problem of serializing attributes where the namespace prefix is "xmlns" as the namespace for this isn't registered by default. This fixes #47.
This commit is contained in:
1 parent
00579eaa8a
commit
75f4e81533
2 files changed
+11
-1
No files matched your search
@@ -82,7 +82,7 @@ module Oga
|
||||
#
|
||||
def to_xml
|
||||
if namespace_name
|
||||
full_name = "#{namespace.name}:#{name}"
|
||||
full_name = "#{namespace_name}:#{name}"
|
||||
else
|
||||
full_name = name
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user