<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Nervous_Tissue [
	<!ELEMENT nervous_tissue (neuronal_network,glial_cell*,vessel*)> <!-- One neuronal network, any number of glial cells and vessels -->
	<!ATTLIST nervous_tissue id NMTOKEN #REQUIRED>
	<!ATTLIST nervous_tissue title NMTOKEN #REQUIRED>
	<!ELEMENT neuronal_network (neuron*,synapse*)> <!-- Zero or more neurons, synapses -->
	<!ATTLIST neuronal_network id NMTOKEN #REQUIRED>
	<!ATTLIST neuronal_network title NMTOKEN #IMPLIED>
	<!ELEMENT neuron (soma,dendrite_tree*,axon)> <!-- Only one soma, only one axon, 0 or more dendrite_tree-s -->
	<!ATTLIST neuron id NMTOKEN #REQUIRED>
	<!ELEMENT synapse EMPTY> <!-- Only one presynapse, and only one postsynapse, defined from their id numbers as attributes -->
	<!ATTLIST synapse id NMTOKEN #REQUIRED>
	<!ATTLIST synapse presynapse_id NMTOKEN "-1"> <!-- can't make it required, it may not be known! "-1" is the default value -->
	<!ATTLIST synapse postsynapse_id NMTOKEN "-1"> <!-- can't make it required, it may not be known! "-1" is the default value -->
	<!ELEMENT presynapse (profile_list)> <!-- Only one profile_list -->
	<!ATTLIST presynapse id NMTOKEN #REQUIRED>
	<!ELEMENT postsynapse (profile_list)> <!-- Only one profile_list -->
	<!ATTLIST postsynapse id NMTOKEN #REQUIRED>
	<!ELEMENT soma (nucleus,profile_list,junction*)> <!-- Only one nucleus and profile_list, and any number of junctions -->
	<!ATTLIST soma id NMTOKEN #REQUIRED>
	<!ELEMENT nucleus (profile_list)> <!-- Only one profile_list -->
	<!ATTLIST nucleus id NMTOKEN #REQUIRED>
	<!ELEMENT dendrite_tree (dendrite_branch+)> <!-- From 1 to infinite branches -->
	<!ATTLIST dendrite_tree id NMTOKEN #REQUIRED>
	<!ELEMENT dendrite_branch (spine*,presynapse*,postsynapse*,profile_list,junction*)> <!-- Any number of spine, presynapse and postsynapse, but only one profile_list. Any number of junctions -->
	<!ATTLIST dendrite_branch id NMTOKEN #REQUIRED>
	<!ELEMENT spine (spine_neck,spine_head)> <!-- Only one spine_neck and spine_head -->
	<!ATTLIST spine id NMTOKEN #REQUIRED>
	<!ELEMENT spine_neck (profile_list,junction*)> <!-- Only one profile_list -->
	<!ATTLIST spine_neck id NMTOKEN #REQUIRED>
	<!ELEMENT spine_head (postsynapse*,spine_apparatus*,profile_list,junction*)> <!-- Any number of postsynapse and spine_apparatus, but onlye one profile_list -->
	<!ATTLIST spine_head id NMTOKEN #REQUIRED>
	<!ELEMENT spine_apparatus (profile_list)> <!-- Only one profile_list -->
	<!ATTLIST spine_apparatus id NMTOKEN #REQUIRED>
	<!ELEMENT axon (axon_branch+)> <!-- At least one axon_branch -->
	<!ATTLIST axon id NMTOKEN #REQUIRED>
	<!ELEMENT axon_branch (presynapse*,postsynapse*,axon_growth_cone*,profile_list,junction*)> <!-- Any number of presynapse and postsynapse, but only one or zero axon_growth_cone (can't define it to have just 0 or 1 with DTD) and only one profile_list -->
	<!ATTLIST axon_branch id NMTOKEN #REQUIRED>
	<!ELEMENT axon_growth_cone (presynapse,postsynapse*,axon_apparatus*,profile_list,junction*)> <!-- Only one presynapse and only one profile_list, but any number of postsynapse and axon_apparatus -->
	<!ATTLIST axon_growth_cone id NMTOKEN #REQUIRED>
	<!ELEMENT axon_apparatus (profile_list)> <!-- Only one profile_list -->
	<!ATTLIST axon_apparatus id NMTOKEN #REQUIRED>
	<!ELEMENT profile_list (profile+)> <!-- At least one profile -->
	<!ELEMENT profile EMPTY>	<!-- Please note: profile is not an attribute but an element. -->
	<!ATTLIST profile id NMTOKEN #REQUIRED> <!-- The database id of the profile -->
	<!ATTLIST profile index NMTOKEN #REQUIRED> <!-- Used to order profile ids by array index. -->
	<!ELEMENT glial_cell (soma)> <!-- one soma -->
	<!ATTLIST glial_cell id NMTOKEN #REQUIRED>
	<!ELEMENT junction (junction_half_A, junction_half_B)> <!-- Two junction_half, defined from their id numbers as attributes -->
	<!ATTLIST junction id NMTOKEN #REQUIRED>
	<!ELEMENT junction_half_A (profile_list)> <!-- Only one profile list -->
	<!ATTLIST junction_half_A id NMTOKEN #REQUIRED>
	<!ELEMENT junction_half_B (profile_list)> <!-- Only one profile list -->
	<!ATTLIST junction_half_B id NMTOKEN #REQUIRED>
	<!ELEMENT vessel (vessel_branch+)> <!-- From zero to any branches -->
	<!ATTLIST vessel id NMTOKEN #REQUIRED>
	<!ELEMENT vessel_branch (profile_list)>
	<!ATTLIST vessel_branch id NMTOKEN #REQUIRED>
] >

<!-- Describe the hierachical structure of the neuronal network -->
<!-- 
General considerations:
=======================
	- There should only be one profile_list element per object that can have it!!
	- A synapse should only contain one presynapse and one postsynapse

NOTE: the way I defined the elements above suggests this file can be modelling a real neuronal network with as many elements of each type as specified. But this file is only the specification of the hierarchy of objects that is to be used for modelling neurons, so there are not going to be any of the empty tags (I'll comment them out below) that I added for example.

NOTE 2: how can an object with two parents be specified? presynapse and postsynapse objects must have two parents: the synapse and something else (a dendrite_branch or a spine or an axon_branch or axon_growth_cone). Well, the id attribute of the presynapse and postsynapse should then be the same ... hum ... yeah! Let's make the synapse have two attributes: a presynapse_id and a postsynapse_id, and not two childs!

NOTE 3: there should be also other cell types, such as glia and endotelial (blood vessels in mammals or traquea in Drosophila) that occur frequently in nervous tissue.

-->


<nervous_tissue id="500" title="one tissue">
	<neuronal_network id="1000" title="one neuronal network">
		<neuron id="0"> <!-- ALL OF THEM SHOULD HAVE A title ATTRIBUTE! -->
			<soma id="1">
				<nucleus id="400">
					<profile_list>
						<profile id="1001" index="401">
						</profile>
						<!--<profile id="1002" index="1">
						</profile>-->
						<!-- More profiles... -->
					</profile_list>
				</nucleus>
				<junction id="402">
					<profile_list>
						<profile id="1003" index="403">
						</profile>
						<!--<profile id="1004" index="1">
						</profile>-->
						<!-- More profiles... -->
					</profile_list>
				</junction>
				<profile_list>
					<profile id="1005" index="0">
					</profile>
					<!--<profile id="1006" index="1">
					</profile>-->
					<!-- More profiles... -->
				</profile_list>
			</soma>

			<dendrite_tree id="2">
				<dendrite_branch id="3">
					<profile_list>
						<profile id="1007" index="0">
						</profile>
						<!--<profile id="1008" index="0">
						</profile>-->
						<!-- More profiles... -->
					</profile_list>
					<spine id="4">
						<spine_head id="32">
							<spine_apparatus id="6">
								<profile_list>
									<profile id="1009" index="1">
									</profile>
									<!--<profile id="1010" index="0">
									</profile>-->
									<!-- More profiles... -->
								</profile_list>
							</spine_apparatus>
							<!--
							<spine_apparatus id="7">
								Another spine apparatus
							</spine_apparatus>
							-->
							<postsynapse id="33">
								<profile_list>
									<profile id="1011" index="0">
									</profile>
									<!--<profile id="1012" index="1">
									</profile>-->
									<!-- More profiles... -->
								</profile_list>
							</postsynapse>
							<profile_list>
								<profile id="1013" index="0">
								</profile>
								<!--<profile id="1014" index="1">
								</profile>-->
								<!-- More profiles... -->
							</profile_list>
							<junction id="405">
								<profile_list>
									<profile id="1015" index="406">
									</profile>
									<!--<profile id="1016" index="1">
									</profile>-->
									<!-- More profiles... -->
								</profile_list>
							</junction>
						</spine_head>
						<spine_neck id="5">
							<profile_list>
								<profile id="1017" index="0">
								</profile>
								<!--<profile id="1018" index="1">
								</profile>-->
								<!-- More profiles... -->
							</profile_list>
							<junction id="407">
								<profile_list>
									<profile id="1019" index="408">
									</profile>
									<!--<profile id="1020" index="1">
									</profile>-->
									<!-- More profiles... -->
								</profile_list>
							</junction>
						</spine_neck>
					</spine>

					<!--
					<spine id="8">
						Another spine 
					</spine>
					-->

					<presynapse id="9">
						<profile_list>
							<profile id="1021" index="0">
							</profile>
							<!--<profile id="1022" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</presynapse>
					<!--
					<presynapse id="10">
						Another presynapse
					</presynapse>
					-->
					<postsynapse id="11">
						<profile_list>
							<profile id="1023" index="0">
							</profile>
							<!--<profile id="1024" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</postsynapse>
					<!--
					<postsynapse id="12">
						 Another postsynapse
					</postsynapse>
					-->
					<junction id="409">
						<profile_list>
							<profile id="1025" index="410">
							</profile>
							<!--<profile id="1026" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</junction>
				</dendrite_branch>
				
				<!--
				<dendrite_branch id="13">
					Another dendrite branch
				</dendrite_branch>
				-->
			</dendrite_tree>

			<!--
			<dendrite_tree id="31">
				Another dendrite_tree ...
			</dendrite_tree>
			-->

			<axon id="14">
				<axon_branch id="15">
					<presynapse id="16">
						<profile_list>
							<profile id="1027" index="0">
							</profile>
							<!--<profile id="1028" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</presynapse>
					<!--
					<presynapse id="17">
						Another presynapse
					</presynapse>
					-->
					<postsynapse id="18">
						<profile_list>
							<profile id="1029" index="0">
							</profile>
							<!--<profile id="1030" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</postsynapse>
					<!--
					<postsynapse id="19">
						Another postsynapse
					</postsynapse>
					-->
					<junction id="411">
						<profile_list>
							<profile id="1031" index="412">
							</profile>
							<!--<profile id="1032" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
					</junction>
					<axon_growth_cone id="20">
						<profile_list>
							<profile id="1033" index="0">
							</profile>
							<!--<profile id="1034" index="1">
							</profile>-->
							<!-- More profiles... -->
						</profile_list>
						<presynapse id="21">
							<profile_list>
								<profile id="1035" index="0">
								</profile>
								<!--<profile id="1036" index="1">
								</profile>-->
								<!-- More profiles... -->
							</profile_list>
						</presynapse>
						<!--
						<presynapse id="22">
							Another presynapse
						</presynapse>
						-->
						<postsynapse id="23">
							<profile_list>
								<profile id="1037" index="0">
								</profile>
								<!--<profile id="1038" index="0">
								</profile>-->
								<!-- More profiles... -->
							</profile_list>
						</postsynapse>
						<!--
						<postsynapse id="24">
							Another postsynapse
						</postsynapse>
						-->
						<junction id="413">
							<profile_list>
								<profile id="1039" index="414">
								</profile>
								<!--<profile id="1040" index="1">
								</profile>-->
								<!-- More profiles... -->
							</profile_list>
						</junction>
					</axon_growth_cone>
				</axon_branch>

				<!--
				<axon_branch id="25">
					Another axon branch
				</axon_branch>
				-->
			</axon>
		</neuron>

		<!--
		<neuron id="26">
			Another neuron
		</neuron>
		-->
		
		<synapse id="27" presynapse_id="28" postsynapse_id="29">
		</synapse>

		<!--
		<synapse id="30" presynapse_id="40" postsynapse_id="41">
			Another synapse
		</synapse>
		-->
	</neuronal_network>

	<glial_cell id="502">
		<soma id="503">
			<nucleus id="504">
				<profile_list>
					<profile id="1041" index="0">
					</profile>
					<!--<profile id="1042" index="1">
					</profile>-->
					<!-- More profiles... -->
				</profile_list>
			</nucleus>
			<junction id="506">
				<profile_list>
					<profile id="1043" index="507">
					</profile>
					<!--<profile id="1044" index="1">
					</profile>-->
					<!-- More profiles... -->
				</profile_list>
			</junction>
			<profile_list>
				<profile id="1045" index="508">
				</profile>
				<!--<profile id="1046" index="1">
				</profile>-->
				<!-- More profiles... -->
			</profile_list>
		</soma>
	</glial_cell>

	<vessel id="509">
		<vessel_branch id="510">
			<profile_list>
				<profile id="1047" index="511">
				</profile>
				<!--<profile id="1048" index="1">
				</profile>-->
				<!-- More profiles... -->
			</profile_list>
		</vessel_branch>
		<!--
		<vessel_branch id="512">
			Another vessel_branch
		</vessel_branch>
		-->
	</vessel>
</nervous_tissue>
