Skip to content

Commit cc09993

Browse files
added changes to the schema location defination removed xml_loc2
1 parent 5178aa8 commit cc09993

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

examples/neuroml2/neuroml2_spec.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,13 @@ class neuroml(Base):
109109
xmlns: str = field(
110110
validator=instance_of(str), default="http://www.neuroml.org/schema/neuroml2"
111111
)
112-
xmlns_url: str = field(
112+
xmlns_xsi: str = field(
113113
validator=instance_of(str), default="http://www.w3.org/2001/XMLSchema-instance"
114114
)
115115
xmlns_loc: str = field(
116-
validator=instance_of(str), default="http://www.neuroml.org/schema/neuroml2"
117-
)
118-
xmln_loc_2: str = field(
119-
validator=instance_of(str),
120-
default="https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd",
116+
validator=instance_of(str), default="http://www.neuroml.org/schema/neuroml2https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
121117
)
118+
122119

123120
izhikevich2007Cells: List[izhikevich2007Cell] = field(factory=list)
124121
pulseGenerators: List[pulseGenerator] = field(factory=list)

src/modelspec/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def build_xml_element(data, parent=None):
267267
# This defines the various namespaces and schemaLocation of the generated xml
268268
if hasattr(data, "xmlns"):
269269
parent.set("xmlns", data.xmlns)
270-
if hasattr(data, "xmlns_url"):
271-
parent.set("xmlns:xsi", data.xmlns_url)
270+
if hasattr(data, "xmlns_xsi"):
271+
parent.set("xmlns:xsi", data.xmlns_xsi)
272272
if hasattr(data, "xmlns_loc"):
273-
parent.set("xsi:schemaLocation", str(data.xmlns_loc + "\n" + data.xmln_loc_2))
273+
parent.set("xsi:schemaLocation", str(data.xmlns_loc))
274274
return parent
275275

276276

0 commit comments

Comments
 (0)