Le TEST_ROOT n'est pas évalué dans le literalinclude
.. |TEST_ROOT| replace:: ../Tests/MappingAccasXsd/
.. |cata_1.py| replace:: :download:`cata_1.py <../Tests/MappingAccasXsd/cata_1.py>`
-.. |cata_1_genere.xsd| replace:: :download:`cata_1_genere.xsd <../Tests/MappingAccasXsd/cata_1_genere.xsd>`
+.. |cata_1.xsd| replace:: :download:`cata_1.xsd <../Tests/MappingAccasXsd/cata_1.xsd>`
.. |cata_1_test1.xml| replace:: :download:`cata_1_test_1.xml <../Tests/MappingAccasXsd/cata_1_test_1.xml>`
Generating the XSD file from the catalog file
generateXSD command
____________________
-To obtain the |cata_1_genere.xsd| file corresponding to the |cata_1.py| file just enter ::
+To obtain the |cata_1.xsd| file corresponding to the |cata_1.py| file just enter ::
python ./generateXSD.py -c ./cata_1.py
:end-before: endJdC
-The generateXSD command has created the |cata_1_genere.xsd| file.
+The generateXSD command has created the |cata_1.xsd| file.
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
You may check it with xmllint command.
Using the XSD model file to get an XML generated driver is as simple as typing ::
- pyxbgen -m cata_1_genere -u cata_1_genere.xsd --write-for-customization
+ pyxbgen -m cata_1_genere -u cata_1.xsd --write-for-customization
It will create an raw/ directory containing various classes imported from the ./cata_1_genere.py file.
Using PyXB generated drivers
_____________________________
-You can use the driver to load an xml file like |cata_1_test1.xml| conforming to the |cata_1_genere.xsd| file.
+You can use the driver to load an xml file like |cata_1_test1.xml| conforming to the |cata_1.xsd| file.
.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_test_1.py
:end-before: CONFIGURATION
Here is the corresponding mapped XSD type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_2"
:end-at: /xs:simpleType
An XSD element local declaration using this type is obviously defined since we declare it in the catalog :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_2"
Here is the corresponding mapped XSD type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_4"
:end-at: /xs:simpleType
And the XSD element local declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_4"
Here is the corresponding mapped XSD type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_2_3"
:end-before: T_test_simp_2_4
An XSD element declaration using this type is also defined as for test_simp2 :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_2_3"
Here is the corresponding mapped XSD type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_2_4"
:end-before: T_test_simp_2_5
If we look at the XSD element declaration, you can see the **default** xsd attribute which is set to a list of 4 numbers.
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_2_5"
The corresponding generated XSD type is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_2_1"
:end-before: T_test_simp_2_2
The corresponding mapped XSD type is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_2_2"
:end-before: T_test_simp_2_3
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_1_1"
:end-at: /xs:simpleType
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_1_1"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_1_3"
:end-before: T_test_simp_2
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_1_3"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_7_4"
:end-at: /xs:simpleType
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_7_4"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_8_1"
:end-at: /xs:simpleType
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_8_1"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_test_simp_8_2"
:end-at: /xs:simpleType
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="test_simp_8_2"
We notice that the *code* parameter declares the name of the code for which the catalog is written.
The xsd mapping is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_Test1"
:end-at: /xs:complexType
The root element declaration is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="Test1"
:end-at: name="Test1"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_ReadMesh"
:end-at: /xs:complexType
The element declaration is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="ReadMesh"
You get the xsd types :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_MyField"
:end-at: /xs:complexType
and
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_onMesh"
:end-at: /xs:simpleType
Concerning the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="MyField"
You get the xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_Test_proc_2"
:end-at: /xs:complexType
And the element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="Test_proc_2"
You get the *PROC* xsd type :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_Meshes"
:end-at: /xs:complexType
And the associated element declaration :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="Meshes"
Concerning the *FACT* xsd type, you get :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_mesh"
:end-at: /xs:complexType
The *SIMP* of UserASSD type becomes :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_name"
:end-at: /xs:simpleType
You get the xsd types :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_MyFieldBis"
:end-at: /xs:complexType
and
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_onMesh_1"
:end-at: /xs:simpleType
Concerning the element declaration, you get :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="MyFieldBis"
You get the two xsd complex types using the **<xs:sequence>** xsd element :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_ThresholdExceedence"
:end-at: /xs:complexType
and
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_Event"
:end-at: /xs:complexType
The element declaration is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="ThresholdExceedence"
You get the xsd complex types using the **<xs:sequence>** xsd element :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_species_parameters"
:end-at: /xs:complexType
The element declaration is :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-at: name="species_parameters"
The xsd mapping provides two **<xs:group>** elements :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_frequency_every"
:end-at: /xs:group
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:start-at: name="T_frequ_not_every"
:end-at: /xs:group
The parent xsd type uses **group ref** declarations :
-.. literalinclude:: ../Tests/MappingAccasXsd/cata_1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/cata_1.xsd
:language: xml
:dedent: 2
:start-after: name="T_Test_proc_5"
For each catalog declared in the *importedBy* keyword **one global xsd type and one global element declaration** are produced :
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="T_MDCommun_Abstract"
:end-at: name="T_MDCommun_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="MDCommun_Abstract"
:end-at: name="MDCommun_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="T_CFDCommun_Abstract"
:end-at: name="T_CFDCommun_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="CFDCommun_Abstract"
:end-at: name="CFDCommun_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="T_DomainSpecific_Abstract"
:end-at: name="T_DomainSpecific_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="DomainSpecific_Abstract"
:end-at: name="DomainSpecific_Abstract"
The root xsd is element type is :
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_modeleCommun.xsd
:language: xml
:start-at: name="T_modeleCommun"
:end-at: /xs:complexType
For each catalog declared in the *importedBy* keyword we get global xsd types and global element declaration production (as for the upper level before) :
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="T_MD1_Abstract"
:end-at: name="T_MD1_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="MD1_Abstract"
:end-at: name="MD1_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="T_MD2_Abstract"
:end-at: name="T_MD2_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="MD2_Abstract"
:end-at: name="MD2_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="T_MDSpecific_Abstract"
:end-at: name="T_MDSpecific_Abstract"
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="MDSpecific_Abstract"
:end-at: name="MDSpecific_Abstract"
The root xsd element type is :
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MDCommun.xsd
:language: xml
:start-at: name="T_MDCommun"
:end-at: /xs:complexType
Since the *importedBy* keyword is empty, there is no abstract type production.
-.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MD1_genere.xsd
+.. literalinclude:: ../Tests/MappingAccasXsd/MultipleCata/cata_MD1.xsd
:language: xml
:start-at: name="T_MD1"
:end-at: /xs:complexType