]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
Ajout de tests de Projections XSD des tuples
authorEric F <eric.fayolle.77@gmail.com>
Mon, 12 Apr 2021 10:49:23 +0000 (12:49 +0200)
committerEric F <eric.fayolle.77@gmail.com>
Mon, 12 Apr 2021 10:49:23 +0000 (12:49 +0200)
Tests/MappingAccasXsd/Tuples/Tuple.xsd [new file with mode: 0644]
Tests/MappingAccasXsd/Tuples/tuple_1.xml [new file with mode: 0644]

diff --git a/Tests/MappingAccasXsd/Tuples/Tuple.xsd b/Tests/MappingAccasXsd/Tuples/Tuple.xsd
new file mode 100644 (file)
index 0000000..0c54f95
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://chercheurs.edf.com/logiciels/Vimmp" xmlns:Vimmp="http://chercheurs.edf.com/logiciels/Vimmp" targetNamespace="http://chercheurs.edf.com/logiciels/Vimmp" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0">\r
+       <xs:simpleType name="T_simp5_element">\r
+               <xs:restriction base="xs:integer"/>\r
+       </xs:simpleType>\r
+       \r
+       <xs:simpleType name="T_simp5_element1">\r
+               <xs:restriction base="xs:integer"/>\r
+       </xs:simpleType>\r
+       \r
+       <xs:simpleType name="T_simp5_element2">\r
+               <xs:restriction base="xs:string"/>\r
+       </xs:simpleType>\r
+       \r
+       <xs:simpleType name="T_simp5_tuple_ref">\r
+               <xs:restriction>\r
+                       <xs:simpleType>\r
+                               <xs:list>\r
+                                       <xs:simpleType>\r
+                                               <xs:restriction base="T_simp5_element"/>\r
+                                       </xs:simpleType>\r
+                               </xs:list>\r
+                       </xs:simpleType>\r
+                       <xs:length value="4"/>\r
+               </xs:restriction>\r
+       </xs:simpleType>\r
+       \r
+       <xs:group name="T_simp5_element1">\r
+       <xs:sequence>\r
+        <xs:element name ="tuple_0" type="T_simp5_element1"/>  \r
+       </xs:sequence>\r
+       </xs:group> \r
+<!--   <xs:element name="T_simp5_element2" type="T_simp5_element2"/>-->\r
+       <xs:group name="T_simp5_element2">\r
+       <xs:sequence>\r
+        <xs:element name ="tuple_1" type="T_simp5_element2"/>  \r
+       </xs:sequence>\r
+       </xs:group> \r
+       \r
+       \r
+       <xs:complexType name="T_simp5_tuple">\r
+       <xs:sequence>\r
+           <xs:group ref="T_simp5_element1" minOccurs="1" maxOccurs="1"/>       \r
+           <xs:group ref="T_simp5_element2" minOccurs="1" maxOccurs="1"/>       \r
+       </xs:sequence>\r
+       </xs:complexType>\r
+       \r
+       \r
+       <xs:group name="T_simp5_lines">\r
+               <xs:sequence>\r
+                       <xs:element name="simp5" type="Vimmp:T_simp5_tuple" minOccurs="3" maxOccurs="3"/>\r
+               </xs:sequence>\r
+       </xs:group>\r
+       \r
+       <xs:group name="T_simp5_content">\r
+               <xs:sequence>\r
+                       <xs:group ref="Vimmp:T_simp5_lines" minOccurs="1" maxOccurs="1"/>\r
+               </xs:sequence>\r
+       </xs:group>\r
+       <xs:complexType name="T_Testtuple_0">\r
+               <xs:complexContent>\r
+                       <xs:extension base="T_step_Vimmp">\r
+                               <xs:sequence>\r
+                                       <xs:group ref="Vimmp:T_simp5_content" minOccurs="1" maxOccurs="1"/>\r
+                               </xs:sequence>\r
+                       </xs:extension>\r
+               </xs:complexContent>\r
+       </xs:complexType>\r
+\r
+       <xs:element name="Testtuple_0" type="Vimmp:T_Testtuple_0" substitutionGroup="step_Vimmp"/>\r
+       \r
+       <xs:complexType name="T_step_Vimmp" abstract="true"/>\r
+       <xs:element name="step_Vimmp" type="Vimmp:T_step_Vimmp"/>\r
+       <xs:element name="Vimmp" type="Vimmp:T_Vimmp"/>\r
+       <xs:complexType name="T_Vimmp">\r
+               <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+                       <xs:element ref="step_Vimmp" minOccurs="0" maxOccurs="1"/>\r
+               </xs:choice>\r
+       </xs:complexType>\r
+</xs:schema>\r
diff --git a/Tests/MappingAccasXsd/Tuples/tuple_1.xml b/Tests/MappingAccasXsd/Tuples/tuple_1.xml
new file mode 100644 (file)
index 0000000..381444a
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--Fichier échantillon XML généré par XMLSpy v2020 rel. 2 sp1 (x64) (http://www.altova.com)-->\r
+<Vimmp:Vimmp xmlns:Vimmp="http://chercheurs.edf.com/logiciels/Vimmp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/Vimmp Tuple.xsd">\r
+<!-- Dans le cas de tuple homogènes    , la projection est la même que la matrice -->\r
+<!-- Dans le cas de tuple non-homogènes, on ajoute dans le catalogue un tuple définissant les noms des balises à utiliser pour différencier les éléments d'un tuple-->\r
+       <Vimmp:step_Vimmp xsi:type="Vimmp:T_Testtuple_0">\r
+               <Vimmp:simp5>\r
+                       <Vimmp:tuple_0>0</Vimmp:tuple_0>\r
+                       <Vimmp:tuple_1>String</Vimmp:tuple_1>\r
+               </Vimmp:simp5>\r
+               <Vimmp:simp5>\r
+                       <Vimmp:tuple_0>0</Vimmp:tuple_0>\r
+                       <Vimmp:tuple_1>String</Vimmp:tuple_1>\r
+               </Vimmp:simp5>\r
+               <Vimmp:simp5>\r
+                       <Vimmp:tuple_0>0</Vimmp:tuple_0>\r
+                       <Vimmp:tuple_1>String</Vimmp:tuple_1>\r
+               </Vimmp:simp5>\r
+       </Vimmp:step_Vimmp>\r
+</Vimmp:Vimmp>\r