Skip to content

Commit 6dd377c

Browse files
added definition for other namespace values in the neuroml class definition
1 parent 40ad91d commit 6dd377c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/neuroml2/neuroml2_spec.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ 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(
113+
validator=instance_of(str), default="http://www.w3.org/2001/XMLSchema-instance"
114+
)
115+
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), default="https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd"
120+
)
112121

113122
izhikevich2007Cells: List[izhikevich2007Cell] = field(factory=list)
114123
pulseGenerators: List[pulseGenerator] = field(factory=list)
@@ -187,3 +196,7 @@ class neuroml(Base):
187196
yy = yaml.dump(doc_dict, indent=4, sort_keys=False)
188197
print(yy)
189198
d.write(yy)
199+
200+
from modelspec.utils import load_xml
201+
new_neuroml = load_xml('hello_world_neuroml.net.nml')
202+
print(new_neuroml)

0 commit comments

Comments
 (0)