]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
Amélioration du XSD grammaire Eficas
authorEric Fayolle <eric.fayolle@edf.fr>
Tue, 19 Feb 2019 15:38:39 +0000 (16:38 +0100)
committerEric Fayolle <eric.fayolle@edf.fr>
Tue, 19 Feb 2019 15:38:39 +0000 (16:38 +0100)
Efi2Xsd/ModeleEficas/Exemple Catalogue 2 (1.1).xml [new file with mode: 0755]
Efi2Xsd/ModeleEficas/Model Efficas (1.1) v9.xsd

diff --git a/Efi2Xsd/ModeleEficas/Exemple Catalogue 2 (1.1).xml b/Efi2Xsd/ModeleEficas/Exemple Catalogue 2 (1.1).xml
new file mode 100755 (executable)
index 0000000..c80f763
--- /dev/null
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<cata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/efficas file:///Z:/MED_SVN/PASCALE/EFICAS/eficas.git/Efi2Xsd/ModeleEficas/Model%20Efficas%20(1.1)%20%20v9.xsd">\r
+       <commandes>\r
+               <OPER efficas:nom="CREECARTE">\r
+                       <SIMP efficas:nom="UNITE" efficas:statut="f" efficas:minOccurences="1" efficas:maxOccurences="1">\r
+                               <!-- La cohérence entre minOccurences et maxOccurences n'est pas vérifié -->\r
+                               <valeurDef>\r
+                                       <!-- Essai liste : si maxOccurences == 1 ne devrait pas pouvoir être une liste -->\r
+                                       <!--                                    <typesimple xsi:type="efficas:T_list_I">21 22</typesimple>-->\r
+                                       <!-- Erreurs volontaires : -->\r
+                                       <!--                                    <typesimple xsi:type="efficas:T_I">21 34 </typesimple>-->\r
+                                       <!--<valeurDef xsi:type="T_I">21 2.2</valeurDef>-->\r
+                                       <typesimple xsi:type="efficas:T_I">21</typesimple>\r
+                               </valeurDef>\r
+                               <nomTypeAttendu>I</nomTypeAttendu>\r
+                       </SIMP>\r
+                       <typeCree>carte</typeCree>\r
+               </OPER>\r
+               <OPER efficas:nom="CREECARTEFLUX">\r
+                       <SIMP efficas:nom="NOMFLUX" efficas:statut="o">\r
+                               <valeurDef>\r
+                                       <TXM>dsd</TXM>\r
+                               </valeurDef>\r
+                               <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                       </SIMP>\r
+                       <typeCree>carte_flux_r</typeCree>\r
+               </OPER>\r
+               <OPER efficas:nom="CREEMAILLE">\r
+                       <SIMP efficas:nom="NOEUDS" efficas:statut="o" efficas:minOccurences="1" efficas:maxOccurences="-1">\r
+                               <!-- La cohérence entre la cardinalité et le type de valeur par défaut n'est pas vérifié -->\r
+                               <!-- La cohérence entre la cardinalité et la taille de la liste n'est pas vérifié -->\r
+                               <valeurDef>\r
+                                       <typesimple xsi:type="efficas:T_list_I">1 2</typesimple>\r
+                               </valeurDef>\r
+                               <!-- La cohérence entre T_list_I et le 'I' du nomTypeAttendu n'est pas vérifié-->\r
+                               <nomTypeAttendu>I</nomTypeAttendu>\r
+                       </SIMP>\r
+                       <typeCree>maille</typeCree>\r
+               </OPER>\r
+               <PROC efficas:nom="E1">\r
+                       <efficas:regles>\r
+                               <!--                            <EXCLUS>ETAT_INIT RESULTAT</EXCLUS>-->\r
+                               <EXCLUS>RESULTAT</EXCLUS>\r
+                               <EXCLUS>ETAT_INIT</EXCLUS>\r
+                       </efficas:regles>\r
+                       <FACT efficas:nom="ETAT_INIT" efficas:statut="f" efficas:maxOccurences="-1">\r
+                               <SIMP efficas:nom="GROUP_MA_1" efficas:statut="o" efficas:maxOccurences="-1">\r
+                                       <nomTypeAttendu>I</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="GROUP_NO_2" efficas:statut="o" efficas:maxOccurences="-1">\r
+                                       <nomTypeAttendu>I</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                       </FACT>\r
+                       <FACT efficas:nom="RESULTAT" efficas:statut="o">\r
+                               <SIMP efficas:nom="DEPL" efficas:statut="o">\r
+                                       <nomTypeAttendu>R</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="VITE" efficas:statut="f">\r
+                                       <nomTypeAttendu>R</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="ACCE" efficas:statut="f">\r
+                                       <nomTypeAttendu>R</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                       </FACT>\r
+               </PROC>\r
+               <PROC efficas:nom="E2">\r
+                       <regles>\r
+                               <UN_PARMI>CONCEPT</UN_PARMI>\r
+                               <UN_PARMI>CONCEPT2</UN_PARMI>\r
+                       </regles>\r
+                       <FACT efficas:nom="CONCEPT">\r
+                               <SIMP efficas:nom="NOM" efficas:statut="o" efficas:maxOccurences="-1">\r
+                                       <!-- On attend une classe utilisateur quelconque, elle n'est pas nommée -->\r
+                                       <nomTypeAttendu>classeUtilisateur</nomTypeAttendu>\r
+                                       <validators>NoRepeat</validators>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="CHAINE" efficas:statut="f">\r
+                                       <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="POSITION" efficas:statut="f">\r
+                                       <valeurDef>\r
+                                               <typesimple xsi:type="efficas:T_I">1</typesimple>\r
+                                       </valeurDef>\r
+                                       <nomTypeAttendu>I</nomTypeAttendu>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="TOUT" efficas:statut="f">\r
+                                       <plageValeur>\r
+                                               <into>\r
+                                                       <TXM>OUI</TXM>\r
+                                                       <TXM>NON</TXM>\r
+                                                       <!-- TODO : On ne devrait pas pouvoir mixer des types différents -->\r
+                                                       <!--                                            <typesimple xsi:type="T_I">1</typesimple>-->\r
+                                                       <!-- Ds un autre cas de type attendu, on pourrait avoir une séquence de tuples -->\r
+                                                       <!-- <tuple>OUI NON</tuple>                                             -->\r
+                                                       <!-- REM: Les tuples ne sont pas forcément homogènes en Eficas : -->\r
+                                                       <!-- <tuple>OUI NON 2</tuple> -->\r
+                                               </into>\r
+                                       </plageValeur>\r
+                                       <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                               </SIMP>\r
+                       </FACT>\r
+                       <!-- Test unicité : Ne devrait pas passer -->\r
+                       <SIMP efficas:nom="CONCEPT2">\r
+                               <nomTypeAttendu>I</nomTypeAttendu>\r
+                       </SIMP>\r
+                       <FACT efficas:nom="CONCEPT3">\r
+                               <SIMP efficas:nom="essai1">\r
+                                       <nomTypeAttendu>I</nomTypeAttendu>\r
+                               </SIMP>\r
+                       </FACT>\r
+               </PROC>\r
+               <!-- Test unicité -->\r
+               <PROC efficas:nom="E3">\r
+                       <SIMP efficas:nom="DEFORMATION" efficas:statut="f">\r
+                               <valeurDef>\r
+                                       <TXM>PETIT</TXM>\r
+                               </valeurDef>\r
+                               <plageValeur>\r
+                                       <into>\r
+                                               <!-- Il n'est pas necessaire d'utiliser les "" ds les tuples -->\r
+                                               <TXM>PETIT</TXM>\r
+                                               <TXM>PETIT</TXM>\r
+                                       </into>\r
+                               </plageValeur>\r
+                               <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                       </SIMP>\r
+                       <BLOC efficas:nom="b_blocIn">\r
+                               <SIMP efficas:nom="ITER_INTE_PAS" efficas:statut="f">\r
+                                       <valeurDef>\r
+                                               <typesimple xsi:type="efficas:T_I">0</typesimple>\r
+                                       </valeurDef>\r
+                                       <nomTypeAttendu>I</nomTypeAttendu>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="ALGO_INTE" efficas:statut="f">\r
+                                       <plageValeur>\r
+                                               <into>\r
+                                                       <TXM>ANALYTIQUE</TXM>\r
+                                                       <TXM>SACANTE</TXM>\r
+                                                       <TXM>DEKKER</TXM>\r
+                                                       <TXM>NEWTON_ID</TXM>\r
+                                                       <TXM>BRENT</TXM>\r
+                                               </into>\r
+                                       </plageValeur>\r
+                                       <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                               </SIMP>\r
+                               <SIMP efficas:nom="CARTE" efficas:statut="f">\r
+                                       <nomTypeAttendu xsi:type="T_nomClasseUtilisateur" efficas:nom="carte">classeUtilisateur</nomTypeAttendu>\r
+                                       <!-- REM : Les deux lignes suivantes sont équivalente et ne permettent pas de spécifier le nom du type utilisateur, le type anonyme hérite de la classe efficas de base -->\r
+                                       <!--                                    <nomTypeAttendu xsi:type="T_classe_utilisateur_name">T_classe_utilisateur</nomTypeAttendu>-->\r
+                                       <!--                                    <nomTypeAttendu>T_classe_utilisateur</nomTypeAttendu>-->\r
+                                       <!-- REM : La ligne suivante est interdite par abstraction -->\r
+                                       <!--                                    <classeUtilisateurName efficas:nom="carte">T_classe_utilisateur</classeUtilisateurName>-->\r
+                               </SIMP>\r
+                               <BLOC efficas:nom="b_carte">\r
+                                       <SIMP efficas:nom="CONTRAINTE" efficas:statut="o" efficas:maxOccurences="-1">\r
+                                               <doc efficas:fr="Options pour le calcul des contraintes et efforts généralisés"/>\r
+                                               <plageValeur>\r
+                                                       <into>\r
+                                                               <fonctionUtilisateur>C_NOM_CHAM_INTO(phenomene='CONTRAINTE',categorie='lin')</fonctionUtilisateur>\r
+                                                       </into>\r
+                                               </plageValeur>\r
+                                               <nomTypeAttendu>TXM</nomTypeAttendu>\r
+                                               <validators>NoRepeat</validators>\r
+                                       </SIMP>\r
+                                       <condition/>\r
+                               </BLOC>\r
+                               <condition>"DEFORMATION in ('PETIT','PETIT_REAC','GROT_GDEP')"</condition>\r
+                       </BLOC>\r
+               </PROC>\r
+       </commandes>\r
+</cata>\r
index 42f4f0f898e53650c053946fcc01f1790feb9ec5..96ade997cf77550f7515cf449c4221cf69d275fe 100755 (executable)
@@ -45,8 +45,8 @@
                <xs:sequence>\r
                        <xs:element ref="commandes" minOccurs="0" maxOccurs="unbounded"/>\r
                </xs:sequence>\r
-           <xs:attribute ref="nom"/>\r
-           <xs:attribute ref="version"/>\r
+               <xs:attribute ref="nom"/>\r
+               <xs:attribute ref="version"/>\r
        </xs:complexType>\r
        <xs:complexType name="T_commandes">\r
                <xs:choice minOccurs="0" maxOccurs="unbounded">\r
                        <xs:maxLength value="2"/>\r
                </xs:restriction>\r
        </xs:simpleType>\r
+       \r
        <!-- Ajouter une contrainte : taille pair -->\r
        <!-- Il n'est pas possible de définir des listes de listes -->\r
        <xs:simpleType name="T_list_C">\r
                        <xs:simpleType>\r
                                <xs:restriction base="xs:string">\r
                                        <xs:whiteSpace value="preserve"/>\r
+                                       <!-- Si on lit le xsd avec le binding pyxb de xmlshema la ligne suivante pose un problème à l'appel de la méthode toxml() -->\r
+                                       <!-- cela est du au fait que minidom write appel objet.replace(..) et que le binding de l'objet whitespace contient un champ 'replace' ; quelle solution ?  renommer le binding o.replace ?-->\r
                                </xs:restriction>\r
                        </xs:simpleType>\r
                </xs:list>\r