--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+This file was generated by Altova MapForce 2018sp1\r
+\r
+YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE\r
+OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.\r
+\r
+Refer to the Altova MapForce Documentation for further details.\r
+http://www.altova.com/mapforce\r
+-->\r
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://chercheurs.edf.com/logiciels/efficas" xmlns:user="http://www.altova.com/MapForce/UDF/user" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" xmlns:grp="http://www.altova.com/Mapforce/grouping" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="ns0 user vmf grp xs fn">\r
+ <xsl:param name="Model_Efficas__1_1____XMLSchema__1_1__v7" select="'Model Efficas (1.1) + XMLSchema (1.1) v7.xml'"/>\r
+ <xsl:function name="grp:Fact_mapping_v2_var9_cur_of_nom">\r
+ <xsl:param name="var8_cur" as="node()"/>\r
+ <xsl:for-each select="$var8_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var39_cur_of_nom">\r
+ <xsl:param name="var38_cur" as="node()"/>\r
+ <xsl:for-each select="$var38_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var46_cur_of_nom">\r
+ <xsl:param name="var45_cur" as="node()"/>\r
+ <xsl:for-each select="$var45_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var48_cur_of_nom">\r
+ <xsl:param name="var47_cur" as="node()"/>\r
+ <xsl:for-each select="$var47_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var50_cur_of_nom">\r
+ <xsl:param name="var49_cur" as="node()"/>\r
+ <xsl:for-each select="$var49_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:template name="user:Fact_mapping_v2">\r
+ <xsl:param name="NameSpaceName" select="()"/>\r
+ <xsl:param name="efficasANDschema" select="()"/>\r
+ <xsl:variable name="var55_nom" as="node()?" select="$efficasANDschema/@ns0:nom"/>\r
+ <xsl:variable name="var56_SIMP" as="node()*" select="$efficasANDschema/ns0:SIMP"/>\r
+ <xsl:variable name="var57_FACT" as="node()*" select="$efficasANDschema/ns0:FACT"/>\r
+ <xsl:variable name="var54_test_resultof_logical_and" as="xs:string*">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:exists($var57_FACT) and xs:boolean(xs:decimal('0')))">\r
+ <xsl:for-each select="$var55_nom">\r
+ <xsl:variable name="var53_cur" as="node()" select="."/>\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var46_cur_of_nom(.)">\r
+ <xsl:variable name="var52_create_FACT" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var48_cur_of_nom(.)">\r
+ <xsl:variable name="var51_map_of_group_by" as="xs:string*">\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var50_cur_of_nom(.)">\r
+ <xsl:for-each select="current-group()/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ </xsl:variable>\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat('T_', fn:string($var53_cur)), xs:string(fn:count($var52_create_FACT/ns0:FACT))), '.'), fn:string-join($var51_map_of_group_by, '.')), '.'), 'KEY:'), current-grouping-key()), '.GID:'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each-group>\r
+ </xsl:for-each-group>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var55_nom">\r
+ <xsl:sequence select="fn:concat('T_', fn:string(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">\r
+ <xsl:variable name="var3_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var2_resultof_filter" as="node()*">\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:variable name="var1_resultof_vmf__inputtoresult" as="xs:boolean">\r
+ <xsl:call-template name="vmf:vmf2_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:if test="$var1_resultof_vmf__inputtoresult">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:exists($var2_resultof_filter)">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var3_resultof_filter">\r
+ <xsl:variable name="var7_cur" as="node()" select="."/>\r
+ <xsl:variable name="var6_resultof_any" as="xs:boolean" select="fn:exists((./@ns0:max_occurs)[(xs:integer(fn:string(.)) != xs:decimal('1'))])"/>\r
+ <simpleType>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:variable name="var5_attribut" as="node()?" select="$var7_cur/@attribut"/>\r
+ <xsl:variable name="var4_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var5_attribut)">\r
+ <xsl:sequence select="fn:string($var5_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat($var4_resultof_vmf__inputtoresult, fn:string(.))"/>\r
+ </xsl:for-each>\r
+ <xsl:if test="fn:not($var6_resultof_any)">\r
+ <restriction>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:attribute name="base" namespace="">\r
+ <xsl:call-template name="vmf:vmf4_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </restriction>\r
+ </xsl:if>\r
+ <xsl:if test="$var6_resultof_any">\r
+ <list>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:attribute name="itemType" namespace="">\r
+ <xsl:call-template name="vmf:vmf4_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </list>\r
+ </xsl:if>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var14_cur" as="node()" select="."/>\r
+ <xsl:variable name="var13_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$NameSpaceName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each-group select="." group-by="grp:Fact_mapping_v2_var9_cur_of_nom(.)">\r
+ <xsl:variable name="var12_nom" as="node()?" select="$var14_cur/@ns0:nom"/>\r
+ <xsl:variable name="var10_create_FACT" as="node()">\r
+ <FACT>\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:variable name="var11_test_resultof_greater" as="xs:string?">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:count($var10_create_FACT/ns0:FACT) > xs:decimal('1'))">\r
+ <xsl:for-each select="$var12_nom">\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:string(.), '++'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var12_nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var11_test_resultof_greater">\r
+ <xsl:attribute name="ns0:nom" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:min_occurs">\r
+ <xsl:attribute name="ns0:min_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:regles">\r
+ <regles>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </regles>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:doc">\r
+ <doc>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </doc>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:BLOC">\r
+ <BLOC>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </BLOC>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var13_resultof_Fact_mapping_v_/xs:simpleType">\r
+ <simpleType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <complexType>\r
+ <xsl:if test="fn:exists($var54_test_resultof_logical_and)">\r
+ <xsl:attribute name="name" namespace="" select="xs:string(fn:string-join(for $x in $var54_test_resultof_logical_and return xs:string($x), ' '))"/>\r
+ </xsl:if>\r
+ <sequence>\r
+ <xsl:variable name="var16_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var15_vmf__inputtoresult_of_attribut" as="xs:boolean?">\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:call-template name="vmf:vmf5_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:not(fn:exists(($var15_vmf__inputtoresult_of_attribut)[.]))">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var16_resultof_filter">\r
+ <xsl:variable name="var21_cur" as="node()" select="."/>\r
+ <xsl:variable name="var20_nom" as="node()?" select="@ns0:nom"/>\r
+ <element>\r
+ <xsl:for-each select="$var20_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var20_nom">\r
+ <xsl:variable name="var18_attribut" as="node()?" select="$var21_cur/@attribut"/>\r
+ <xsl:variable name="var17_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var18_attribut)">\r
+ <xsl:sequence select="fn:string($var18_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':'), fn:concat($var17_resultof_vmf__inputtoresult, fn:string(.))))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var19_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf6_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var19_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var24_nom" as="node()?" select="@ns0:nom"/>\r
+ <element>\r
+ <xsl:for-each select="$var24_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var24_nom">\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':T_'), fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var22_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf7_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var22_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:variable name="var23_cur_as_integer" as="xs:integer" select="xs:integer(fn:string(.))"/>\r
+ <xsl:attribute name="maxOccurs" namespace="">\r
+ <xsl:choose>\r
+ <xsl:when test="($var23_cur_as_integer = xs:decimal('-1'))">\r
+ <xsl:sequence select="'unbounded'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="xs:string($var23_cur_as_integer)"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ </sequence>\r
+ <xsl:variable name="var26_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var25_vmf__inputtoresult_of_attribut" as="xs:boolean?">\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:call-template name="vmf:vmf5_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:exists(($var25_vmf__inputtoresult_of_attribut)[.])">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var26_resultof_filter">\r
+ <xsl:variable name="var31_cur" as="node()" select="."/>\r
+ <xsl:variable name="var30_nom" as="node()?" select="@ns0:nom"/>\r
+ <attribute>\r
+ <xsl:for-each select="$var30_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var30_nom">\r
+ <xsl:variable name="var28_attribut" as="node()?" select="$var31_cur/@attribut"/>\r
+ <xsl:variable name="var27_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var28_attribut)">\r
+ <xsl:sequence select="fn:string($var28_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':'), fn:concat($var27_resultof_vmf__inputtoresult, fn:string(.))))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var29_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf8_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var29_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="use" namespace="" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </attribute>\r
+ </xsl:for-each>\r
+ </complexType>\r
+ <xsl:variable name="var34_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var33_resultof_filter" as="node()*">\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:variable name="var32_resultof_vmf__inputtoresult" as="xs:boolean">\r
+ <xsl:call-template name="vmf:vmf2_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:if test="$var32_resultof_vmf__inputtoresult">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:not(fn:exists($var33_resultof_filter))">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var34_resultof_filter">\r
+ <xsl:variable name="var37_cur" as="node()" select="."/>\r
+ <complexType>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:variable name="var36_attribut" as="node()?" select="$var37_cur/@attribut"/>\r
+ <xsl:variable name="var35_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var36_attribut)">\r
+ <xsl:sequence select="fn:string($var36_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat($var35_resultof_vmf__inputtoresult, fn:string(.))"/>\r
+ </xsl:for-each>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var44_cur" as="node()" select="."/>\r
+ <xsl:variable name="var43_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$NameSpaceName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each-group select="." group-by="grp:Fact_mapping_v2_var39_cur_of_nom(.)">\r
+ <xsl:variable name="var42_nom" as="node()?" select="$var44_cur/@ns0:nom"/>\r
+ <xsl:variable name="var40_create_FACT" as="node()">\r
+ <FACT>\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:variable name="var41_test_resultof_greater" as="xs:string?">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:count($var40_create_FACT/ns0:FACT) > xs:decimal('1'))">\r
+ <xsl:for-each select="$var42_nom">\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:string(.), '++'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var42_nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var41_test_resultof_greater">\r
+ <xsl:attribute name="ns0:nom" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:min_occurs">\r
+ <xsl:attribute name="ns0:min_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:regles">\r
+ <regles>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </regles>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:doc">\r
+ <doc>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </doc>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:BLOC">\r
+ <BLOC>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </BLOC>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var43_resultof_Fact_mapping_v_/xs:complexType">\r
+ <complexType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </schema>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf1_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf2_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='Fichier'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Repertoire'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='TXM'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='I'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='R'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='C'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Bool'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gma'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gmo'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='SalomeEntry'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="false()"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf3_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'AT_'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='n'">\r
+ <xsl:copy-of select="'T_'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="'T_'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf4_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='TXM'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='I'">\r
+ <xsl:copy-of select="fn:QName('', 'int')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='R'">\r
+ <xsl:copy-of select="fn:QName('', 'double')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Bool'">\r
+ <xsl:copy-of select="fn:QName('', 'boolean')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gma'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gmo'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="fn:QName('', 'false')"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf5_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='n'">\r
+ <xsl:copy-of select="false()"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf6_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf7_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf8_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'optional'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'required'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:output method="xml" encoding="UTF-8" byte-order-mark="no" indent="yes"/>\r
+ <xsl:param name="UserNameSpace" as="xs:string" required="yes"/>\r
+ <xsl:param name="PrefixName" as="xs:string" required="yes"/>\r
+ <xsl:template match="/">\r
+ <xsl:variable name="var8_resultof_concat" as="xs:string" select="fn:concat($UserNameSpace, $PrefixName)"/>\r
+ <xsl:variable name="var7_cata" as="node()?" select="ns0:cata"/>\r
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">\r
+ <xsl:namespace name="{$PrefixName}">\r
+ <xsl:sequence select="$var8_resultof_concat"/>\r
+ </xsl:namespace>\r
+ <xsl:attribute name="targetNamespace" namespace="" select="xs:string(xs:anyURI($var8_resultof_concat))"/>\r
+ <xsl:attribute name="attributeFormDefault" namespace="" select="'qualified'"/>\r
+ <xsl:attribute name="elementFormDefault" namespace="" select="'qualified'"/>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC/ns0:FACT">\r
+ <xsl:variable name="var1_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$PrefixName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:attribute name="attribut" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <typeAttendu>\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </typeAttendu>\r
+ </xsl:for-each>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var1_resultof_Fact_mapping_v_/xs:simpleType">\r
+ <simpleType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC">\r
+ <complexType>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat('T_', fn:string(@ns0:nom))"/>\r
+ <sequence>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <xsl:variable name="var4_nom_as_string" as="xs:string" select="fn:string(@ns0:nom)"/>\r
+ <element>\r
+ <xsl:attribute name="name" namespace="" select="$var4_nom_as_string"/>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($PrefixName, ':T_'), $var4_nom_as_string))"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var2_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf1_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var2_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:variable name="var3_cur_as_integer" as="xs:integer" select="xs:integer(fn:string(.))"/>\r
+ <xsl:attribute name="maxOccurs" namespace="">\r
+ <xsl:choose>\r
+ <xsl:when test="($var3_cur_as_integer = xs:decimal('-1'))">\r
+ <xsl:sequence select="'unbounded'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="xs:string($var3_cur_as_integer)"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ </sequence>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC/ns0:FACT">\r
+ <xsl:variable name="var5_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$PrefixName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:attribute name="attribut" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <typeAttendu>\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </typeAttendu>\r
+ </xsl:for-each>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var5_resultof_Fact_mapping_v_/xs:complexType">\r
+ <complexType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC">\r
+ <xsl:variable name="var6_nom_as_string" as="xs:string" select="fn:string(@ns0:nom)"/>\r
+ <element>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($PrefixName, ':T_'), $var6_nom_as_string))"/>\r
+ <xsl:attribute name="name" namespace="" select="$var6_nom_as_string"/>\r
+ </element>\r
+ </xsl:for-each>\r
+ </schema>\r
+ </xsl:template>\r
+</xsl:stylesheet>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:med="http://chercheurs.edf.com/logiciels/med"
+ targetNamespace="http://chercheurs.edf.com/logiciels/med"
+ attributeFormDefault="qualified"
+ elementFormDefault="qualified">
+ <simpleType name="AT_NAME">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_NAMEbis">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_NUM">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_NAME">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_DES">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="T_IDE">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="T_VAL">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="T_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_NOM">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="T_TEST2">
+ <restriction base="string"/>
+ </simpleType>
+ <complexType name="T_FAS">
+ <sequence>
+ <element name="FAMILY_MESH_NAME_REF" type="med:T_FAMILY_MESH_NAME_REF" minOccurs="1"
+ maxOccurs="unbounded"/>
+ <element name="ELEM2" type="med:T_ELEM2"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_FAMILY_MESH_NAME_REF">
+ <sequence>
+ <element name="NAMEbis" type="med:T_NAMEbis" minOccurs="1"/>
+ <element name="ELEM" type="med:T_ELEM" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="NAME" type="med:AT_NAME" use="required"/>
+ </complexType>
+ <complexType name="T_ELEM">
+ <sequence>
+ <element name="NUM" type="med:T_NUM" minOccurs="1"/>
+ <element name="NAME" type="med:T_NAME" minOccurs="1"/>
+ <element name="ATT" type="med:T_ATT" minOccurs="0" maxOccurs="1"/>
+ <element name="GRO" type="med:T_GRO" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_ATT">
+ <sequence>
+ <element name="DES" type="med:T_DES" minOccurs="1"/>
+ <element name="IDE" type="med:T_IDE" minOccurs="1"/>
+ <element name="VAL" type="med:T_VAL" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <complexType name="T_GRO">
+ <sequence>
+ <element name="NBR" type="med:T_NBR" minOccurs="1"/>
+ <element name="NOM" type="med:T_NOM" minOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_ELEM2">
+ <sequence>
+ <element name="TEST2" type="med:T_TEST2"/>
+ </sequence>
+ </complexType>
+ <element type="med:T_FAS" name="FAS"/>
+</schema>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:med="http://chercheurs.edf.com/logiciels/med"
+ targetNamespace="http://chercheurs.edf.com/logiciels/med"
+ attributeFormDefault="qualified"
+ elementFormDefault="qualified">
+ <simpleType name="AT_NAME">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="AT_NUM">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="AT_NAME">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_DES">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="T_IDE">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="T_VAL">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_NOM">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="AT_NUM">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_DES">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="T_IDE">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="T_VAL">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="AT_NUM">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="AT_NAME">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_DES">
+ <list itemType="string"/>
+ </simpleType>
+ <simpleType name="T_IDE">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="T_VAL">
+ <list itemType="int"/>
+ </simpleType>
+ <simpleType name="AT_NBR">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_NOM">
+ <list itemType="string"/>
+ </simpleType>
+ <complexType name="T_FAS">
+ <sequence>
+ <element name="FAMILY_MESH_NAME_REF" type="med:T_FAMILY_MESH_NAME_REF" minOccurs="1"
+ maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_FAMILY_MESH_NAME_REF">
+ <sequence>
+ <element name="ELEME" type="med:T_ELEME" minOccurs="0" maxOccurs="1"/>
+ <element name="FAMILLE_ZERO" type="med:T_FAMILLE_ZERO" minOccurs="1" maxOccurs="1"/>
+ <element name="NOEUD" type="med:T_NOEUD" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="NAME" type="med:AT_NAME" use="required"/>
+ </complexType>
+ <complexType name="T_ELEME">
+ <sequence>
+ <element name="FAMILY_NAME_ELEM" type="med:T_FAMILY_NAME_ELEM" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_FAMILY_NAME_ELEM">
+ <sequence>
+ <element name="ATT" type="med:T_ATT" minOccurs="0" maxOccurs="1"/>
+ <element name="GRO" type="med:T_GRO" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="NUM" type="med:AT_NUM" use="required"/>
+ <attribute name="NAME" type="med:AT_NAME" use="required"/>
+ </complexType>
+ <complexType name="T_ATT">
+ <sequence>
+ <element name="DES" type="med:T_DES" minOccurs="1"/>
+ <element name="IDE" type="med:T_IDE" minOccurs="1"/>
+ <element name="VAL" type="med:T_VAL" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <complexType name="T_GRO">
+ <sequence>
+ <element name="NOM" type="med:T_NOM" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <complexType name="T_FAMILLE_ZERO">
+ <sequence>
+ <element name="ATT" type="med:T_ATT" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="NUM" type="med:AT_NUM" use="required"/>
+ </complexType>
+ <complexType name="T_ATT">
+ <sequence>
+ <element name="DES" type="med:T_DES" minOccurs="1"/>
+ <element name="IDE" type="med:T_IDE" minOccurs="1"/>
+ <element name="VAL" type="med:T_VAL" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <complexType name="T_NOEUD">
+ <sequence>
+ <element name="FAMILY_NAME_NOE" type="med:T_FAMILY_NAME_NOE" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_FAMILY_NAME_NOE">
+ <sequence>
+ <element name="ATT" type="med:T_ATT" minOccurs="0" maxOccurs="1"/>
+ <element name="GRO" type="med:T_GRO" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="NUM" type="med:AT_NUM" use="required"/>
+ <attribute name="NAME" type="med:AT_NAME" use="required"/>
+ </complexType>
+ <complexType name="T_ATT">
+ <sequence>
+ <element name="DES" type="med:T_DES" minOccurs="1"/>
+ <element name="IDE" type="med:T_IDE" minOccurs="1"/>
+ <element name="VAL" type="med:T_VAL" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <complexType name="T_GRO">
+ <sequence>
+ <element name="NOM" type="med:T_NOM" minOccurs="1"/>
+ </sequence>
+ <attribute name="NBR" type="med:AT_NBR" use="required"/>
+ </complexType>
+ <element type="med:T_FAS" name="FAS"/>
+</schema>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+This file was generated by Altova MapForce 2018sp1\r
+\r
+YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE\r
+OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.\r
+\r
+Refer to the Altova MapForce Documentation for further details.\r
+http://www.altova.com/mapforce\r
+-->\r
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://chercheurs.edf.com/logiciels/efficas" xmlns:user="http://www.altova.com/MapForce/UDF/user" xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" xmlns:grp="http://www.altova.com/Mapforce/grouping" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="ns0 user vmf grp xs fn">\r
+ <xsl:param name="Model_Efficas__1_1____XMLSchema__1_1__v7" select="'Model Efficas (1.1) + XMLSchema (1.1) v7.xml'"/>\r
+ <xsl:function name="grp:Fact_mapping_v2_var9_cur_of_nom">\r
+ <xsl:param name="var8_cur" as="node()"/>\r
+ <xsl:for-each select="$var8_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var39_cur_of_nom">\r
+ <xsl:param name="var38_cur" as="node()"/>\r
+ <xsl:for-each select="$var38_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var46_cur_of_nom">\r
+ <xsl:param name="var45_cur" as="node()"/>\r
+ <xsl:for-each select="$var45_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var48_cur_of_nom">\r
+ <xsl:param name="var47_cur" as="node()"/>\r
+ <xsl:for-each select="$var47_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:function name="grp:Fact_mapping_v2_var50_cur_of_nom">\r
+ <xsl:param name="var49_cur" as="node()"/>\r
+ <xsl:for-each select="$var49_cur/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:function>\r
+ <xsl:template name="user:Fact_mapping_v2">\r
+ <xsl:param name="NameSpaceName" select="()"/>\r
+ <xsl:param name="efficasANDschema" select="()"/>\r
+ <xsl:variable name="var55_nom" as="node()?" select="$efficasANDschema/@ns0:nom"/>\r
+ <xsl:variable name="var56_SIMP" as="node()*" select="$efficasANDschema/ns0:SIMP"/>\r
+ <xsl:variable name="var57_FACT" as="node()*" select="$efficasANDschema/ns0:FACT"/>\r
+ <xsl:variable name="var54_test_resultof_logical_and" as="xs:string*">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:exists($var57_FACT) and xs:boolean(xs:decimal('0')))">\r
+ <xsl:for-each select="$var55_nom">\r
+ <xsl:variable name="var53_cur" as="node()" select="."/>\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var46_cur_of_nom(.)">\r
+ <xsl:variable name="var52_create_FACT" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var48_cur_of_nom(.)">\r
+ <xsl:variable name="var51_map_of_group_by" as="xs:string*">\r
+ <xsl:for-each-group select="$var57_FACT" group-by="grp:Fact_mapping_v2_var50_cur_of_nom(.)">\r
+ <xsl:for-each select="current-group()/@ns0:nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ </xsl:variable>\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat(fn:concat('T_', fn:string($var53_cur)), xs:string(fn:count($var52_create_FACT/ns0:FACT))), '.'), fn:string-join($var51_map_of_group_by, '.')), '.'), 'KEY:'), current-grouping-key()), '.GID:'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each-group>\r
+ </xsl:for-each-group>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var55_nom">\r
+ <xsl:sequence select="fn:concat('T_', fn:string(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">\r
+ <xsl:variable name="var3_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var2_resultof_filter" as="node()*">\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:variable name="var1_resultof_vmf__inputtoresult" as="xs:boolean">\r
+ <xsl:call-template name="vmf:vmf2_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:if test="$var1_resultof_vmf__inputtoresult">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:exists($var2_resultof_filter)">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var3_resultof_filter">\r
+ <xsl:variable name="var7_cur" as="node()" select="."/>\r
+ <xsl:variable name="var6_resultof_any" as="xs:boolean" select="fn:exists((./@ns0:max_occurs)[(xs:integer(fn:string(.)) != xs:decimal('1'))])"/>\r
+ <simpleType>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:variable name="var5_attribut" as="node()?" select="$var7_cur/@attribut"/>\r
+ <xsl:variable name="var4_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var5_attribut)">\r
+ <xsl:sequence select="fn:string($var5_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat($var4_resultof_vmf__inputtoresult, fn:string(.))"/>\r
+ </xsl:for-each>\r
+ <xsl:if test="fn:not($var6_resultof_any)">\r
+ <restriction>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:attribute name="base" namespace="">\r
+ <xsl:call-template name="vmf:vmf4_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </restriction>\r
+ </xsl:if>\r
+ <xsl:if test="$var6_resultof_any">\r
+ <list>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:attribute name="itemType" namespace="">\r
+ <xsl:call-template name="vmf:vmf4_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </list>\r
+ </xsl:if>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var14_cur" as="node()" select="."/>\r
+ <xsl:variable name="var13_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$NameSpaceName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each-group select="." group-by="grp:Fact_mapping_v2_var9_cur_of_nom(.)">\r
+ <xsl:variable name="var12_nom" as="node()?" select="$var14_cur/@ns0:nom"/>\r
+ <xsl:variable name="var10_create_FACT" as="node()">\r
+ <FACT>\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:variable name="var11_test_resultof_greater" as="xs:string?">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:count($var10_create_FACT/ns0:FACT) > xs:decimal('1'))">\r
+ <xsl:for-each select="$var12_nom">\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:string(.), '++'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var12_nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var11_test_resultof_greater">\r
+ <xsl:attribute name="ns0:nom" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:min_occurs">\r
+ <xsl:attribute name="ns0:min_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:regles">\r
+ <regles>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </regles>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:doc">\r
+ <doc>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </doc>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:BLOC">\r
+ <BLOC>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </BLOC>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var13_resultof_Fact_mapping_v_/xs:simpleType">\r
+ <simpleType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <complexType>\r
+ <xsl:if test="fn:exists($var54_test_resultof_logical_and)">\r
+ <xsl:attribute name="name" namespace="" select="xs:string(fn:string-join(for $x in $var54_test_resultof_logical_and return xs:string($x), ' '))"/>\r
+ </xsl:if>\r
+ <sequence>\r
+ <xsl:variable name="var16_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var15_vmf__inputtoresult_of_attribut" as="xs:boolean?">\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:call-template name="vmf:vmf5_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:not(fn:exists(($var15_vmf__inputtoresult_of_attribut)[.]))">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var16_resultof_filter">\r
+ <xsl:variable name="var21_cur" as="node()" select="."/>\r
+ <xsl:variable name="var20_nom" as="node()?" select="@ns0:nom"/>\r
+ <element>\r
+ <xsl:for-each select="$var20_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var20_nom">\r
+ <xsl:variable name="var18_attribut" as="node()?" select="$var21_cur/@attribut"/>\r
+ <xsl:variable name="var17_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var18_attribut)">\r
+ <xsl:sequence select="fn:string($var18_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':'), fn:concat($var17_resultof_vmf__inputtoresult, fn:string(.))))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var19_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf6_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var19_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var24_nom" as="node()?" select="@ns0:nom"/>\r
+ <element>\r
+ <xsl:for-each select="$var24_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var24_nom">\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':T_'), fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var22_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf7_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var22_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:variable name="var23_cur_as_integer" as="xs:integer" select="xs:integer(fn:string(.))"/>\r
+ <xsl:attribute name="maxOccurs" namespace="">\r
+ <xsl:choose>\r
+ <xsl:when test="($var23_cur_as_integer = xs:decimal('-1'))">\r
+ <xsl:sequence select="'unbounded'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="xs:string($var23_cur_as_integer)"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ </sequence>\r
+ <xsl:variable name="var26_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var25_vmf__inputtoresult_of_attribut" as="xs:boolean?">\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:call-template name="vmf:vmf5_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:exists(($var25_vmf__inputtoresult_of_attribut)[.])">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var26_resultof_filter">\r
+ <xsl:variable name="var31_cur" as="node()" select="."/>\r
+ <xsl:variable name="var30_nom" as="node()?" select="@ns0:nom"/>\r
+ <attribute>\r
+ <xsl:for-each select="$var30_nom">\r
+ <xsl:attribute name="name" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var30_nom">\r
+ <xsl:variable name="var28_attribut" as="node()?" select="$var31_cur/@attribut"/>\r
+ <xsl:variable name="var27_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var28_attribut)">\r
+ <xsl:sequence select="fn:string($var28_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($NameSpaceName, ':'), fn:concat($var27_resultof_vmf__inputtoresult, fn:string(.))))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var29_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf8_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var29_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="use" namespace="" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </attribute>\r
+ </xsl:for-each>\r
+ </complexType>\r
+ <xsl:variable name="var34_resultof_filter" as="node()*">\r
+ <xsl:for-each select="$var56_SIMP">\r
+ <xsl:variable name="var33_resultof_filter" as="node()*">\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <xsl:variable name="var32_resultof_vmf__inputtoresult" as="xs:boolean">\r
+ <xsl:call-template name="vmf:vmf2_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:if test="$var32_resultof_vmf__inputtoresult">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:if test="fn:not(fn:exists($var33_resultof_filter))">\r
+ <xsl:sequence select="."/>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var34_resultof_filter">\r
+ <xsl:variable name="var37_cur" as="node()" select="."/>\r
+ <complexType>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:variable name="var36_attribut" as="node()?" select="$var37_cur/@attribut"/>\r
+ <xsl:variable name="var35_resultof_vmf__inputtoresult" as="xs:string">\r
+ <xsl:call-template name="vmf:vmf3_inputtoresult">\r
+ <xsl:with-param name="input" as="xs:string">\r
+ <xsl:choose>\r
+ <xsl:when test="fn:exists($var36_attribut)">\r
+ <xsl:sequence select="fn:string($var36_attribut)"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="'n'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat($var35_resultof_vmf__inputtoresult, fn:string(.))"/>\r
+ </xsl:for-each>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var57_FACT">\r
+ <xsl:variable name="var44_cur" as="node()" select="."/>\r
+ <xsl:variable name="var43_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$NameSpaceName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:for-each-group select="." group-by="grp:Fact_mapping_v2_var39_cur_of_nom(.)">\r
+ <xsl:variable name="var42_nom" as="node()?" select="$var44_cur/@ns0:nom"/>\r
+ <xsl:variable name="var40_create_FACT" as="node()">\r
+ <FACT>\r
+ <xsl:for-each select="current-group()">\r
+ <FACT>\r
+ <xsl:for-each select="@ns0:nom">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:variable>\r
+ <xsl:variable name="var41_test_resultof_greater" as="xs:string?">\r
+ <xsl:choose>\r
+ <xsl:when test="(fn:count($var40_create_FACT/ns0:FACT) > xs:decimal('1'))">\r
+ <xsl:for-each select="$var42_nom">\r
+ <xsl:sequence select="fn:concat(fn:concat(fn:string(.), '++'), xs:string(xs:decimal('0')))"/>\r
+ </xsl:for-each>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:for-each select="$var42_nom">\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var41_test_resultof_greater">\r
+ <xsl:attribute name="ns0:nom" select="."/>\r
+ </xsl:for-each>\r
+ </xsl:for-each-group>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:min_occurs">\r
+ <xsl:attribute name="ns0:min_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:regles">\r
+ <regles>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </regles>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:doc">\r
+ <doc>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </doc>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:BLOC">\r
+ <BLOC>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </BLOC>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var43_resultof_Fact_mapping_v_/xs:complexType">\r
+ <complexType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ </schema>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf1_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf2_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='Fichier'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Repertoire'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='TXM'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='I'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='R'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='C'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Bool'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gma'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gmo'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='SalomeEntry'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="false()"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf3_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'AT_'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='n'">\r
+ <xsl:copy-of select="'T_'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="'T_'"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf4_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='TXM'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='I'">\r
+ <xsl:copy-of select="fn:QName('', 'int')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='R'">\r
+ <xsl:copy-of select="fn:QName('', 'double')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='Bool'">\r
+ <xsl:copy-of select="fn:QName('', 'boolean')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gma'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='gmo'">\r
+ <xsl:copy-of select="fn:QName('', 'string')"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:copy-of select="fn:QName('', 'false')"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf5_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="true()"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='n'">\r
+ <xsl:copy-of select="false()"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf6_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf7_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'0'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'1'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:template name="vmf:vmf8_inputtoresult">\r
+ <xsl:param name="input" select="()"/>\r
+ <xsl:choose>\r
+ <xsl:when test="$input='f'">\r
+ <xsl:copy-of select="'optional'"/>\r
+ </xsl:when>\r
+ <xsl:when test="$input='o'">\r
+ <xsl:copy-of select="'required'"/>\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ <xsl:output method="xml" encoding="UTF-8" byte-order-mark="no" indent="yes"/>\r
+ <xsl:param name="UserNameSpace" as="xs:string" required="yes"/>\r
+ <xsl:param name="PrefixName" as="xs:string" required="yes"/>\r
+ <xsl:template match="/">\r
+ <xsl:variable name="var8_resultof_concat" as="xs:string" select="fn:concat($UserNameSpace, $PrefixName)"/>\r
+ <xsl:variable name="var7_cata" as="node()?" select="ns0:cata"/>\r
+ <schema xmlns="http://www.w3.org/2001/XMLSchema">\r
+ <xsl:namespace name="{$PrefixName}">\r
+ <xsl:sequence select="$var8_resultof_concat"/>\r
+ </xsl:namespace>\r
+ <xsl:attribute name="targetNamespace" namespace="" select="xs:string(xs:anyURI($var8_resultof_concat))"/>\r
+ <xsl:attribute name="attributeFormDefault" namespace="" select="'qualified'"/>\r
+ <xsl:attribute name="elementFormDefault" namespace="" select="'qualified'"/>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC/ns0:FACT">\r
+ <xsl:variable name="var1_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$PrefixName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:attribute name="attribut" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <typeAttendu>\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </typeAttendu>\r
+ </xsl:for-each>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var1_resultof_Fact_mapping_v_/xs:simpleType">\r
+ <simpleType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </simpleType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC">\r
+ <complexType>\r
+ <xsl:attribute name="name" namespace="" select="fn:concat('T_', fn:string(@ns0:nom))"/>\r
+ <sequence>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <xsl:variable name="var4_nom_as_string" as="xs:string" select="fn:string(@ns0:nom)"/>\r
+ <element>\r
+ <xsl:attribute name="name" namespace="" select="$var4_nom_as_string"/>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($PrefixName, ':T_'), $var4_nom_as_string))"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:variable name="var2_resultof_vmf__inputtoresult" as="xs:string?">\r
+ <xsl:call-template name="vmf:vmf1_inputtoresult">\r
+ <xsl:with-param name="input" select="fn:string(.)" as="xs:string"/>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var2_resultof_vmf__inputtoresult">\r
+ <xsl:attribute name="minOccurs" namespace="" select="xs:string(xs:integer(.))"/>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:variable name="var3_cur_as_integer" as="xs:integer" select="xs:integer(fn:string(.))"/>\r
+ <xsl:attribute name="maxOccurs" namespace="">\r
+ <xsl:choose>\r
+ <xsl:when test="($var3_cur_as_integer = xs:decimal('-1'))">\r
+ <xsl:sequence select="'unbounded'"/>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:sequence select="xs:string($var3_cur_as_integer)"/>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:attribute>\r
+ </xsl:for-each>\r
+ </element>\r
+ </xsl:for-each>\r
+ </sequence>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC/ns0:FACT">\r
+ <xsl:variable name="var5_resultof_Fact_mapping_v_" as="node()?">\r
+ <xsl:call-template name="user:Fact_mapping_v2">\r
+ <xsl:with-param name="NameSpaceName" select="$PrefixName" as="xs:string"/>\r
+ <xsl:with-param name="efficasANDschema" as="node()">\r
+ <FACT xmlns="http://chercheurs.edf.com/logiciels/efficas">\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:FACT">\r
+ <FACT>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </FACT>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:SIMP">\r
+ <SIMP>\r
+ <xsl:attribute name="ns0:nom" select="fn:string(@ns0:nom)"/>\r
+ <xsl:for-each select="@ns0:statut">\r
+ <xsl:attribute name="ns0:statut" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@ns0:max_occurs">\r
+ <xsl:attribute name="ns0:max_occurs" select="xs:string(xs:integer(fn:string(.)))"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="@attribut">\r
+ <xsl:attribute name="attribut" namespace="" select="fn:string(.)"/>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="ns0:typeAttendu">\r
+ <typeAttendu>\r
+ <xsl:sequence select="fn:string(.)"/>\r
+ </typeAttendu>\r
+ </xsl:for-each>\r
+ </SIMP>\r
+ </xsl:for-each>\r
+ </FACT>\r
+ </xsl:with-param>\r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:for-each select="$var5_resultof_Fact_mapping_v_/xs:complexType">\r
+ <complexType>\r
+ <xsl:sequence select="(./@node(), ./node())"/>\r
+ </complexType>\r
+ </xsl:for-each>\r
+ </xsl:for-each>\r
+ <xsl:for-each select="$var7_cata/ns0:commandes/ns0:PROC">\r
+ <xsl:variable name="var6_nom_as_string" as="xs:string" select="fn:string(@ns0:nom)"/>\r
+ <element>\r
+ <xsl:attribute name="type" namespace="" select="fn:QName(' ', fn:concat(fn:concat($PrefixName, ':T_'), $var6_nom_as_string))"/>\r
+ <xsl:attribute name="name" namespace="" select="$var6_nom_as_string"/>\r
+ </element>\r
+ </xsl:for-each>\r
+ </schema>\r
+ </xsl:template>\r
+</xsl:stylesheet>\r
--- /dev/null
+saxonb-xslt -s:../Cata_MED_FAM.xml -xsl:MappingMapToXMLSchema_1_1__ef.xslt PrefixName=med UserNameSpace='http://chercheurs.edf.com/logiciels/'