Removed empty string initializers for name and updated XML schema

This commit is contained in:
Will Boyd 2015-04-30 23:38:53 -04:00
parent 9b422b1c95
commit d6228b2e1a
6 changed files with 70 additions and 10 deletions

View file

@ -977,7 +977,6 @@ contains
end if
! Copy cell name
c % name = ''
if (check_for_node(node_cell, "name")) then
call get_node_value(node_cell, "name", c % name)
end if
@ -1162,7 +1161,6 @@ contains
end if
! Copy surface name
s % name = ''
if (check_for_node(node_surf, "name")) then
call get_node_value(node_surf, "name", s % name)
end if
@ -1290,7 +1288,6 @@ contains
end if
! Copy lattice name
lat % name = ''
if (check_for_node(node_lat, "name")) then
call get_node_value(node_lat, "name", lat % name)
end if
@ -1419,7 +1416,6 @@ contains
end if
! Copy lattice name
lat % name = ''
if (check_for_node(node_lat, "name")) then
call get_node_value(node_lat, "name", lat % name)
end if
@ -1670,7 +1666,6 @@ contains
end if
! Copy material name
mat % name = ''
if (check_for_node(node_mat, "name")) then
call get_node_value(node_mat, "name", mat % name)
end if
@ -2238,7 +2233,6 @@ contains
end if
! Copy tally name
t % name = ''
if (check_for_node(node_tal, "name")) &
call get_node_value(node_tal, "name", t % name)

View file

@ -1,6 +1,8 @@
element geometry {
element cell {
(element id { xsd:int } | attribute id { xsd:int }) &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
(element universe { xsd:int } | attribute universe { xsd:int })? &
(
(element fill { xsd:int } | attribute fill { xsd:int }) |
@ -14,6 +16,8 @@ element geometry {
& element surface {
(element id { xsd:int } | attribute id { xsd:int }) &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
(element type { xsd:string { maxLength = "15" } } |
attribute type { xsd:string { maxLength = "15" } }) &
(element coeffs { list { xsd:double+ } } | attribute coeffs { list { xsd:double+ } }) &
@ -23,6 +27,8 @@ element geometry {
& element lattice {
(element id { xsd:int } | attribute id { xsd:int }) &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
(element dimension { list { xsd:positiveInteger+ } } |
attribute dimension { list { xsd:positiveInteger+ } }) &
(element lower_left { list { xsd:double+ } } | attribute lower_left { list { xsd:double+ } }) &
@ -33,6 +39,8 @@ element geometry {
& element hex_lattice {
(element id { xsd:int } | attribute id { xsd:int }) &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
(element n_rings { xsd:int } | attribute n_rings { xsd:int }) &
(element n_axial { xsd:int } | attribute n_axial { xsd:int })? &
(element center { list { xsd:double+ } } | attribute center { list { xsd:double+ } }) &

View file

@ -12,6 +12,20 @@
<data type="int"/>
</attribute>
</choice>
<optional>
<choice>
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</attribute>
</choice>
</optional>
<optional>
<choice>
<element name="universe">
@ -114,6 +128,20 @@
<data type="int"/>
</attribute>
</choice>
<optional>
<choice>
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</attribute>
</choice>
</optional>
<choice>
<element name="type">
<data type="string">
@ -174,6 +202,20 @@
<data type="int"/>
</attribute>
</choice>
<optional>
<choice>
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</attribute>
</choice>
</optional>
<choice>
<element name="dimension">
<list>
@ -262,6 +304,20 @@
<data type="int"/>
</attribute>
</choice>
<optional>
<choice>
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</attribute>
</choice>
</optional>
<choice>
<element name="n_rings">
<data type="int"/>

View file

@ -1,6 +1,8 @@
element materials {
element material {
(element id { xsd:int } | attribute id { xsd:int }) &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
element density {
(element value { xsd:double } | attribute value { xsd:double })? &

View file

@ -17,8 +17,8 @@ element tallies {
element tally {
(element id { xsd:int } | attribute id { xsd:int }) &
(element label { xsd:string { maxLength="52" } } |
attribute label { xsd:string { maxLength="52" } })? &
(element name { xsd:string { maxLength="52" } } |
attribute name { xsd:string { maxLength="52" } })? &
(element estimator { ( "analog" | "tracklength" ) } |
attribute estimator { ( "analog" | "tracklength" ) })? &
element filter {

View file

@ -108,12 +108,12 @@
</choice>
<optional>
<choice>
<element name="label">
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
</element>
<attribute name="label">
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>