xml_schema_mapper 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xml_schema_mapper/version.rb +1 -1
- data/lib/xml_schema_mapper.rb +2 -2
- metadata +2 -2
data/lib/xml_schema_mapper.rb
CHANGED
@@ -134,14 +134,14 @@ module XmlSchemaMapper
|
|
134
134
|
|
135
135
|
def xml_document
|
136
136
|
document = XmlSchemaMapper::Builder.create_document(_type)
|
137
|
-
document.root.namespace =
|
137
|
+
document.root.namespace = find_root_namespace(document)
|
138
138
|
|
139
139
|
builder = XmlSchemaMapper::Builder.new(self, document.root, namespace_resolver)
|
140
140
|
builder.build
|
141
141
|
builder.document
|
142
142
|
end
|
143
143
|
|
144
|
-
def
|
144
|
+
def find_root_namespace(document)
|
145
145
|
namespaces = namespace_resolver || schema.namespaces
|
146
146
|
ns = namespaces.find_by_href (global_element || _type).namespace
|
147
147
|
document.root.add_namespace_definition(ns.prefix, ns.href)
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: xml_schema_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Anton Sozontov
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|