pyxbgen -u modele_atmo.xsd -m atmo --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test1.xsd -m atmo1 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test2.xsd -m atmo2 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test3.xsd -m atmo3 --write-for-customization
+/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo_test4.xsd -m atmo4 --write-for-customization
+
/local/PyXB-1.2.6/scripts/pyxbgen -u modele_atmo.xsd -m atmo --write-for-customization
/local/PyXB-1.2.6/scripts/pyxbgen -u model_atmo_ext.xsd -m atmo_ext --write-for-customization
<?xml version="1.0" encoding="UTF-8"?>\r
-<!--Sample XML file generated by XMLSpy v2015 rel. 4 (http://www.altova.com)-->\r
<cata efficas:nom="Atmo" xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/efficas ../Efi2Xsd/ModeleEficas/Model%20Efficas%20(1.1)%20%20v9.xsd">\r
<commandes>\r
\r
-import raw.atmo_test1 as mdm
+import raw.atmo1 as mdm
my_Wind_Speed=mdm.T_Wind_Speed(0)
my_Value=mdm.T_Value(0)
my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test1.xml', 'w').write(xmls)
+
+# ou
+# liste=[my_Value1,my_Unit1]
+# my_Mesure1=mdm.T_Mesure1(*liste)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+# my_Atmos=mdm.Atmos(my_Wind)
+# my_Atmos.toxml()
--- /dev/null
+import raw.atmo2 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure)
+
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1)
+# my_Wind.append(my_Wind_Speed)
+# my_Wind.append(my_Mesure)
+# ou
+# my_Wind.extend([my_Wind_Speed,my_Mesure])
+# ou
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure)
+
+
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test2.xml', 'w').write(xmls)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+ <simpleType name="T_Wind_Speed1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Wind_Speed">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <complexType name="T_Atmos">
+ <sequence>
+ <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure1">
+ <sequence maxOccurs="4">
+ <element name="Value1" type="atmos:T_Value1"/>
+ <element name="Unit1" type="atmos:T_Unit1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure">
+ <sequence maxOccurs="4">
+ <element name="Value" type="atmos:T_Value"/>
+ <element name="Unit" type="atmos:T_Unit"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Wind">
+ <sequence>
+ <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+ <element name="Mesure1" type="atmos:T_Mesure1"/>
+ <group ref="atmos:T_B_enter_mesure" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="Atmos" type="atmos:T_Atmos"/>
+ <group name="T_B_enter_mesure">
+ <sequence>
+ <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+ <element name="Mesure" type="atmos:T_Mesure"/>
+ </sequence>
+ </group>
+</schema>
--- /dev/null
+import raw.atmo3 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+#on peut instancier l'élément global directement
+my_B_enter_mesure=mdm.B_enter_mesure(my_Wind_Speed,my_Mesure)
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test3.xml', 'w').write(xmls)
+
+# ou
+# liste=[my_Value1,my_Unit1]
+# my_Mesure1=mdm.T_Mesure1(*liste)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_B_enter_mesure)
+# my_Atmos=mdm.Atmos(my_Wind)
+# my_Atmos.toxml()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+ <simpleType name="T_Wind_Speed1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Wind_Speed">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <complexType name="T_Atmos">
+ <sequence>
+ <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure1">
+ <sequence maxOccurs="4">
+ <element name="Value1" type="atmos:T_Value1"/>
+ <element name="Unit1" type="atmos:T_Unit1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure">
+ <sequence maxOccurs="4">
+ <element name="Value" type="atmos:T_Value"/>
+ <element name="Unit" type="atmos:T_Unit"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Wind">
+ <sequence>
+ <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+ <element name="Mesure1" type="atmos:T_Mesure1"/>
+ <element ref="atmos:B_enter_mesure" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_B_enter_mesure">
+ <sequence>
+ <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+ <element name="Mesure" type="atmos:T_Mesure"/>
+ </sequence>
+ </complexType>
+ <element name="Atmos" type="atmos:T_Atmos"/>
+ <element name="B_enter_mesure" type="atmos:T_B_enter_mesure"/>
+</schema>
--- /dev/null
+import raw.atmo4 as mdm
+
+my_Wind_Speed=mdm.T_Wind_Speed(0)
+my_Value=mdm.T_Value(0)
+my_Unit=mdm.T_Unit(0)
+my_Mesure=mdm.T_Mesure(my_Value,my_Unit)
+# my_B_enter_mesure=mdm.T_B_enter_mesure(my_Wind_Speed,my_Mesure)
+
+my_Wind_Speed1=mdm.T_Wind_Speed1(1)
+my_Value1=mdm.T_Value1(1)
+my_Unit1=mdm.T_Unit1(1)
+my_Mesure1=mdm.T_Mesure1(my_Value1,my_Unit1)
+
+# my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1)
+# my_Wind.append(my_Wind_Speed)
+# my_Wind.append(my_Mesure)
+# ou
+# my_Wind.extend([my_Wind_Speed,my_Mesure])
+# ou
+my_Wind=mdm.T_Wind(my_Wind_Speed1,my_Mesure1,my_Wind_Speed,my_Mesure)
+
+
+my_Atmos=mdm.Atmos(my_Wind)
+xmls=my_Atmos.toxml()
+xmls=my_Atmos.toDOM().toprettyxml()
+
+open('modele_atmo_test4.xml', 'w').write(xmls)
+
+import pyxb
+class T_Wind_Speed2 (pyxb.binding.datatypes.int):
+
+ """An atomic simple type."""
+
+ _ExpandedName = pyxb.namespace.ExpandedName(mdm.Namespace, u'T_Wind_Speed2')
+ _XSDLocation = pyxb.utils.utility.Location('', 0, 0)
+ _Documentation = None
+mdm.Namespace.addCategoryObject('typeBinding', u'T_Wind_Speed2', T_Wind_Speed2)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:atmos="http://chercheurs.edf.com/logiciels/atmos" targetNamespace="http://chercheurs.edf.com/logiciels/atmos" elementFormDefault="qualified" attributeFormDefault="qualified">
+ <simpleType name="T_Wind_Speed1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Wind_Speed">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Speed_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_Value1">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_Unit1">
+ <restriction base="string"/>
+ </simpleType>
+ <complexType name="T_Atmos">
+ <sequence>
+ <element name="Wind" type="atmos:T_Wind" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure1">
+ <sequence maxOccurs="4">
+ <element name="Value1" type="atmos:T_Value1"/>
+ <element name="Unit1" type="atmos:T_Unit1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Mesure">
+ <sequence maxOccurs="4">
+ <element name="Value" type="atmos:T_Value"/>
+ <element name="Unit" type="atmos:T_Unit"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Wind">
+ <sequence>
+ <element name="Wind_Speed1" type="atmos:T_Wind_Speed1"/>
+ <element name="Mesure1" type="atmos:T_Mesure1"/>
+ <sequence>
+ <element name="Wind_Speed" type="atmos:T_Wind_Speed"/>
+ <element name="Mesure" type="atmos:T_Mesure"/>
+ </sequence>
+ </sequence>
+ </complexType>
+ <complexType name="T_B_enter_mesure"/>
+ <element name="Atmos" type="atmos:T_Atmos"/>
+</schema>