Fix materials.xml RELAX NG schema

This commit is contained in:
Paul Romano 2017-02-24 14:10:46 -06:00
parent f40578dd26
commit 0ffc4711e3
2 changed files with 122 additions and 169 deletions

View file

@ -27,23 +27,12 @@ element materials {
attribute name { xsd:string })
}* &
element element {
(element name { xsd:string { maxLength = "2" } } |
attribute name { xsd:string { maxLength = "2" } }) &
(element scattering { ( "data" | "iso-in-lab" ) } |
attribute scattering { ( "data" | "iso-in-lab" ) })? &
(
(element ao { xsd:double } | attribute ao { xsd:double }) |
(element wo { xsd:double } | attribute wo { xsd:double })
)
}* &
element sab {
(element name { xsd:string } | attribute name { xsd:string })
}*
}+
}+ &
element cross_sections { xsd:string { maxLength = "255" } }? &
element multipole_library { xsd:string { maxLength = "255" } }? &
element multipole_library { xsd:string { maxLength = "255" } }?
}

View file

@ -1,64 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="materials" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<oneOrMore>
<element name="material">
<interleave>
<choice>
<element name="id">
<data type="int"/>
</element>
<attribute name="id">
<data type="int"/>
</attribute>
</choice>
<optional>
<interleave>
<oneOrMore>
<element name="material">
<interleave>
<choice>
<element name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
<element name="id">
<data type="int"/>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">52</param>
</data>
<attribute name="id">
<data type="int"/>
</attribute>
</choice>
</optional>
<optional>
<element name="temperature">
<data type="double"/>
</element>
</optional>
<element name="density">
<interleave>
<optional>
<choice>
<element name="value">
<data type="double"/>
</element>
<attribute name="value">
<data type="double"/>
</attribute>
</choice>
</optional>
<optional>
<choice>
<element name="units">
<element name="name">
<data type="string">
<param name="maxLength">10</param>
<param name="maxLength">52</param>
</data>
</element>
<attribute name="units">
<attribute name="name">
<data type="string">
<param name="maxLength">10</param>
<param name="maxLength">52</param>
</data>
</attribute>
</choice>
</interleave>
</element>
<zeroOrMore>
<element name="nuclide">
</optional>
<optional>
<element name="temperature">
<data type="double"/>
</element>
</optional>
<element name="density">
<interleave>
<optional>
<choice>
<element name="value">
<data type="double"/>
</element>
<attribute name="value">
<data type="double"/>
</attribute>
</choice>
</optional>
<choice>
<element name="units">
<data type="string">
<param name="maxLength">10</param>
</data>
</element>
<attribute name="units">
<data type="string">
<param name="maxLength">10</param>
</data>
</attribute>
</choice>
</interleave>
</element>
<zeroOrMore>
<element name="nuclide">
<interleave>
<choice>
<element name="name">
<data type="string"/>
</element>
<attribute name="name">
<data type="string"/>
</attribute>
</choice>
<optional>
<choice>
<element name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</element>
<attribute name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</attribute>
</choice>
</optional>
<choice>
<choice>
<element name="ao">
<data type="double"/>
</element>
<attribute name="ao">
<data type="double"/>
</attribute>
</choice>
<choice>
<element name="wo">
<data type="double"/>
</element>
<attribute name="wo">
<data type="double"/>
</attribute>
</choice>
</choice>
</interleave>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="macroscopic">
<choice>
<element name="name">
<data type="string"/>
@ -67,120 +115,36 @@
<data type="string"/>
</attribute>
</choice>
<optional>
<choice>
<element name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</element>
<attribute name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</attribute>
</choice>
</optional>
<choice>
<choice>
<element name="ao">
<data type="double"/>
</element>
<attribute name="ao">
<data type="double"/>
</attribute>
</choice>
<choice>
<element name="wo">
<data type="double"/>
</element>
<attribute name="wo">
<data type="double"/>
</attribute>
</choice>
</choice>
</interleave>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="macroscopic">
<choice>
<element name="name">
<data type="string"/>
</element>
<attribute name="name">
<data type="string"/>
</attribute>
</choice>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="element">
<interleave>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="sab">
<choice>
<element name="name">
<data type="string">
<param name="maxLength">2</param>
</data>
<data type="string"/>
</element>
<attribute name="name">
<data type="string">
<param name="maxLength">2</param>
</data>
<data type="string"/>
</attribute>
</choice>
<optional>
<choice>
<element name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</element>
<attribute name="scattering">
<choice>
<value>data</value>
<value>iso-in-lab</value>
</choice>
</attribute>
</choice>
</optional>
<choice>
<choice>
<element name="ao">
<data type="double"/>
</element>
<attribute name="ao">
<data type="double"/>
</attribute>
</choice>
<choice>
<element name="wo">
<data type="double"/>
</element>
<attribute name="wo">
<data type="double"/>
</attribute>
</choice>
</choice>
</interleave>
</element>
</zeroOrMore>
<zeroOrMore>
<element name="sab">
<choice>
<element name="name">
<data type="string"/>
</element>
<attribute name="name">
<data type="string"/>
</attribute>
</choice>
</element>
</zeroOrMore>
</interleave>
</element>
</oneOrMore>
</element>
</zeroOrMore>
</interleave>
</element>
</oneOrMore>
<optional>
<element name="cross_sections">
<data type="string">
<param name="maxLength">255</param>
</data>
</element>
</optional>
<optional>
<element name="multipole_library">
<data type="string">
<param name="maxLength">255</param>
</data>
</element>
</optional>
</interleave>
</element>