Changeset 10487


Ignore:
Timestamp:
02/07/08 18:49:13 (4 years ago)
Author:
sys
Message:

Suppression de webMacro

Location:
trunk
Files:
1 added
9 deleted
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/uiTemplate/freeUiTemplate/xml.xed.xml

    r10307 r10487  
    4141                        xmlns:se="http://www.utc.fr/ics/scenari/v3/editing" 
    4242                        xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" 
     43                        xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
    4344                        se:namespaces="true"> 
    4445        <xmlview se:bind="document"> 
     
    6061                                        </atts> 
    6162                                </element> 
    62                                 <se:choice se:card="+"> 
    63                                         <element se:bind="element" se:name="sm:templateWebMacroXhtml"> 
    64                                                 <atts> 
    65                                                         <attribute se:bind="attribute" se:name="code" se:defaultvalue="*" se:mandat="true"> 
    66                                                                 <wordsInput notnull="true" trim="true" filterRegExp="^\*|[a-zA-Z0-9]+$"/> 
    67                                                         </attribute> 
    68                                                         <attribute se:bind="attribute" se:name="templateEncoding" se:mandat="true" se:defaultvalue="ISO-8859-1"> 
    69                                                                 <wordsInput trim="true" notnull="true"/> 
    70                                                         </attribute> 
    71                                                         <attribute se:bind="attribute" se:name="resultEncoding" se:mandat="true" se:defaultvalue="ISO-8859-1"> 
    72                                                                 <wordsInput trim="true" notnull="true"/> 
    73                                                         </attribute> 
    74                                                         <attribute se:bind="attribute" se:name="resultExtension" se:mandat="true" se:defaultvalue=".html"> 
    75                                                                 <wordsInput trim="true" notnull="true"/> 
    76                                                         </attribute> 
    77                                                         <attribute se:name="pageUnicityCriterion" se:bind="attribute"  se:defaultvalue="hierarchicalContext"> 
    78                                                                 <choiceInput notnull="true"> 
    79                                                                         <ciItem label="none"/> 
    80                                                                         <ciItem label="hierarchicalContext"/> 
    81                                                                 </choiceInput> 
    82                                                         </attribute> 
     63                                <alternativeAlone se:bind="choice"> 
     64                                        <element se:bind="element" se:name="sm:templateXsl"> 
     65                                                <atts orient="vertical" align="start"> 
     66                                                        <hbox> 
     67                                                                <attribute se:bind="attribute" se:name="templateEncoding" se:mandat="true" se:defaultvalue="UTF-8"> 
     68                                                                        <wordsInput trim="true" notnull="true"/> 
     69                                                                </attribute> 
     70                                                                <attribute se:name="pageUnicityCriterion" se:bind="attribute"  se:defaultvalue="hierarchicalContext"> 
     71                                                                        <choiceInput notnull="true"> 
     72                                                                                <ciItem label="none"/> 
     73                                                                                <ciItem label="hierarchicalContext"/> 
     74                                                                        </choiceInput> 
     75                                                                </attribute> 
     76                                                        </hbox> 
     77                                                        <hbox> 
     78                                                                <attribute se:bind="attribute" se:name="resultEncoding" se:mandat="true" se:defaultvalue="UTF-8"> 
     79                                                                        <wordsInput trim="true" notnull="true"/> 
     80                                                                </attribute> 
     81                                                                <attribute se:bind="attribute" se:name="resultExtension" se:mandat="true" se:defaultvalue=".html"> 
     82                                                                        <wordsInput trim="true" notnull="true"/> 
     83                                                                </attribute> 
     84                                                                <attribute se:bind="attribute" se:name="resultXslMethod" se:mandat="true" se:defaultvalue="html"> 
     85                                                                        <wordsInput trim="true" notnull="true"/> 
     86                                                                </attribute> 
     87                                                        </hbox> 
     88                                                        <hbox> 
     89                                                                <attribute se:bind="attribute" se:name="resultDocTypePublic"> 
     90                                                                        <wordsInput trim="true"/> 
     91                                                                </attribute> 
     92                                                                <attribute se:bind="attribute" se:name="resultDocTypeSystem"> 
     93                                                                        <wordsInput trim="true"/> 
     94                                                                </attribute> 
     95                                                        </hbox> 
    8396                                                </atts> 
    8497                                                <childs> 
    8598                                                        <element se:bind="element" se:name="sm:contentTemplate"> 
    8699                                                                <atts> 
    87                                                                         <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*@sc_webmacro\b.*"/> 
     100                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*@sc_xsl\b.*"/> 
    88101                                                                </atts> 
    89102                                                                <!--<childs> 
     
    92105                                                                        </textnode> 
    93106                                                                </childs>--> 
    94                                                         </element> 
    95                                                         <element se:name="sm:customizableStyle" se:bind="element" se:card="?"> 
    96                                                                 <childs> 
    97                                                                         <textnode se:bind="text"> 
    98                                                                                 <textpanelInput filterspaces="false"/> 
    99                                                                         </textnode> 
    100                                                                 </childs> 
    101                                                         </element> 
    102                                                         <element se:name="sm:customizableStylePreview" se:bind="element" se:card="?"> 
    103                                                                 <childs> 
    104                                                                         <textnode se:bind="text"> 
    105                                                                                 <textpanelInput filterspaces="false"/> 
    106                                                                         </textnode> 
    107                                                                 </childs> 
    108107                                                        </element> 
    109108                                                        <se:choice se:card="*"> 
     
    118117                                                                                                                <ciItem label="xhtmlContent"/> 
    119118                                                                                                                <ciItem label="navigation"/> 
     119                                                                                                                <ciItem label="title"/> 
    120120                                                                                                        </choiceInput> 
    121121                                                                                                </attribute> 
     
    136136                                                                        </atts> 
    137137                                                                </element> 
    138                                                                 <element se:name="sm:postXsl" se:bind="element" se:show="ifExist" forcefilled="true"> 
     138                                                                <element se:id="sm:postXsl" se:name="sm:postXsl" se:bind="element" se:show="ifExist" forcefilled="true"> 
    139139                                                                        <atts> 
    140140                                                                                <attribute se:bind="attribute" se:name="key" se:mandat="true"> 
    141                                                                                         <wordsInput trim="true" notnull="true"/> 
     141                                                                                        <wordsInput trim="true" notnull="true" autocompleteProviderXPath="../xul:fixedProvider"/> 
     142                                                                                                <fixedProvider> 
     143                                                                                                        <fpItem value="xhtml"/> 
     144                                                                                                </fixedProvider> 
    142145                                                                                </attribute> 
    143146                                                                        </atts> 
     
    177180                                                </childs> 
    178181                                        </element> 
    179                                         <!-- 
    180                                         <element se:bind="element" se:name="sm:templateWebMacro"> 
     182                                        <element se:bind="element" se:name="sm:templateWebMacroXhtml"> 
    181183                                                <atts> 
    182                                                         <attribute se:bind="attribute" se:name="code" se:defaultvalue="*" se:mandat="true"> 
    183                                                                 <wordsInput notnull="true" trim="true" filterRegExp="^\*|[a-zA-Z0-9]+$"/> 
    184                                                         </attribute> 
    185                                                         <attribute se:bind="attribute" se:name="templateEncoding"> 
    186                                                                 <wordsInput trim="true"/> 
    187                                                         </attribute> 
    188                                                         <attribute se:bind="attribute" se:name="resultEncoding"> 
    189                                                                 <wordsInput trim="true"/> 
    190                                                         </attribute> 
    191                                                         <attribute se:bind="attribute" se:name="resultExtension"> 
    192                                                                 <wordsInput trim="true"/> 
     184                                                        <!-- attribut code PLUS UTILISE : à virer dans une migration. --> 
     185                                                        <attribute se:bind="attribute" se:name="code" se:defaultvalue="*" se:mandat="false" se:show="ifExist"> 
     186                                                                <wordsInput/> 
     187                                                        </attribute> 
     188                                                        <attribute se:bind="attribute" se:name="templateEncoding" se:mandat="true" se:defaultvalue="ISO-8859-1"> 
     189                                                                <wordsInput trim="true" notnull="true"/> 
     190                                                        </attribute> 
     191                                                        <attribute se:bind="attribute" se:name="resultEncoding" se:mandat="true" se:defaultvalue="ISO-8859-1"> 
     192                                                                <wordsInput trim="true" notnull="true"/> 
     193                                                        </attribute> 
     194                                                        <attribute se:bind="attribute" se:name="resultExtension" se:mandat="true" se:defaultvalue=".html"> 
     195                                                                <wordsInput trim="true" notnull="true"/> 
     196                                                        </attribute> 
     197                                                        <attribute se:name="pageUnicityCriterion" se:bind="attribute"  se:defaultvalue="hierarchicalContext"> 
     198                                                                <choiceInput notnull="true"> 
     199                                                                        <ciItem label="none"/> 
     200                                                                        <ciItem label="hierarchicalContext"/> 
     201                                                                </choiceInput> 
    193202                                                        </attribute> 
    194203                                                </atts> 
     
    198207                                                                        <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*@sc_webmacro\b.*"/> 
    199208                                                                </atts> 
     209                                                                <!--<childs> 
     210                                                                        <textnode se:bind="text"> 
     211                                                                                <textpanelInput filterspaces="false"/> 
     212                                                                        </textnode> 
     213                                                                </childs>--> 
    200214                                                        </element> 
    201                                                         <se:ref se:refid="sm:calledModels"/> 
     215                                                        <se:choice se:card="*"> 
     216                                                                <se:ref se:refid="sm:calledModels"/> 
     217                                                                <element se:name="sm:calledWidget" se:bind="element" se:show="ifExist" se:card="*" forcefilled="true"> 
     218                                                                        <atts> 
     219                                                                                <ptritem se:bind="plugin" se:attributes="sc:refUri" class="xmlview" notnull="true" regexpSgn=".*#UiWidget.*"/> 
     220                                                                        </atts> 
     221                                                                </element> 
     222                                                                <element se:name="sm:calledZone" se:bind="element" se:show="ifExist" forcefilled="true"> 
     223                                                                        <atts> 
     224                                                                                <attribute se:bind="attribute" se:name="key" se:mandat="true"> 
     225                                                                                        <wordsInput trim="true" notnull="true"/> 
     226                                                                                </attribute> 
     227                                                                        </atts> 
     228                                                                </element> 
     229                                                                <se:ref se:refid="sm:postXsl"/> 
     230                                                        </se:choice> 
    202231                                                        <insert se:bind="current"/> 
    203232                                                </childs> 
    204233                                        </element> 
    205                                                 --> 
    206                                 </se:choice> 
    207                                 <insert se:bind="current"/> 
     234                                </alternativeAlone> 
    208235                        </childs> 
    209236                </element> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_armoireUiTemplate.xml

    r10307 r10487  
    7474        </valeur> 
    7575         
    76         <!-- @API bsRootFragment : inclusion des agents pour les Widgets du template --> 
     76        <!-- @API bsRootFragment : inclusion des agents pour les Widgets du template 
     77                @param = code du template. 
     78         --> 
    7779        <valeur code="bsRootFragment"> 
    7880                <source type="xpathOnSrc-dynamique"> 
    79                 concatExpr(//sm:Widget, si(setEntryBuffer('checkWidget', @sc:refUri),  
    80                         concat('&lt;valeur code="tplWidget_', getIdFromPath(@sc:refUri), '"&gt;', resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/contentAgent')), '&lt;/valeur&gt;') 
     81                        concatExpr(//sm:Widget, si(setEntryBuffer('checkWidget', @sc:refUri),  
     82                                concat('&lt;valeur code="tplWidget_', getIdFromPath(@sc:refUri), '"&gt;', resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/contentAgent')), '&lt;/valeur&gt;') 
    8183                        )) 
    8284                </source> 
     
    8789                        - resultatDialogue('.../destPathTemplate') pour le path du dossier de destination du template. 
    8890                        - resultatDialogue('.../destPathTemplateResInSite') pour l'uri du dossier de destination des ressources du site de ce template. 
    89                         - resultatDialogue('.../destUrlStyle') pour intégrer le path vers le fichier de style associé à ce template. 
    9091                 --> 
    9192        <groupAffichage code="publishFile"> 
    92                 <affichage code="templateWmXhtml"> 
    93                         <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), '.wm')</urlPage> 
     93                <affichage code="templateXhtml"> 
     94                        <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), '.xsl')</urlPage> 
    9495                        <page> 
    95                                 <modele>wmTemplate-xhtml</modele> 
    96                                 <zone cle="listPostXsl"><liste><item>xhtml</item><item>text</item></liste></zone> 
    97                                 <zone cle="mainZone" type="contextuel-dynamique"> 
    98                                         <choose> 
    99                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'html' and resultatAgent('//standard/doctypeUri') = 'no'" type="xslOnSrc-dynamique" href="bs:templateHtmlDtNoUri.wm.xsl"/> 
    100                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'html'" type="xslOnSrc-dynamique" href="bs:templateHtml.wm.xsl"/> 
    101                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'xml' and resultatAgent('//standard/mmlNamespace') = 'yes'" type="xslOnSrc-dynamique" href="bs:templateXhtmlDtNoUri.wm.xsl"/> 
    102                                                 <default type="xslOnSrc-dynamique" href="bs:templateXhtml.wm.xsl"/> 
    103                                         </choose> 
    104                                 </zone> 
    105                                 <zone cle="content-type">UTF-8</zone> 
     96                                <modele>xslTemplate-xhtml</modele> 
     97                                <zone cle="listPostXsl"><liste><item>xhtml</item></liste></zone> 
     98                                <zone cle="mainZone" type="xslOnSrc-dynamique" href="bs:template.xsl.xsl"/> 
    10699                        </page> 
    107100                        <valeur code="templateResources"> 
     
    121114                        </valeur> 
    122115                </affichage> 
    123                  
    124                 <affichage code="outline.xsl" racine="//sm:callOutline" codecomposant="getIdNode(.)"> 
    125                         <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', 'outline', codeAgent(.), '.xsl')</urlPage> 
    126                         <page> 
    127                                 <zone cle="mainZone" type="xslOnSrc-dynamique" href="bs:outline.xsl.xsl"/> 
    128                                 <zone cle="content-type">UTF-8</zone> 
    129                         </page> 
    130                 </affichage>             
    131 <!--             
    132                 <affichage code="outline.xsl"> 
    133                         <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', 'outline.xsl')</urlPage> 
    134                         <page> 
    135                                 <zone cle="mainZone" type="xslOnSrc-dynamique" href="bs:outline.xsl.xsl"/> 
    136                                 <zone cle="content-type">UTF-8</zone> 
    137                         </page> 
    138                 </affichage> 
    139 -->     </groupAffichage> 
     116        </groupAffichage> 
    140117 
    141118                 
     
    147124                        - resultatDialogue('.../destUrlTemplateResInSite'). 
    148125                        - resultatDialogue('.../destUrlTemplateFolder'). 
    149                         - resultatDialogue('.../destUrlStyle'). 
    150126        --> 
    151127        <valeur code="templateDefinition"> 
     
    161137                                        <template  
    162138                                                        code="{$vCodeTemplate}"  
    163                                                         className="com.scenari.m.ge.pages.WmPage" 
    164                                                         templateUri="{concat(resultatDialogue('.../destUrlTemplateFolder'), '/', $vCodeTemplate, '.wm')}" 
    165                                                         templateEncoding="UTF-8" 
     139                                                        className="com.scenari.m.ge.pages.TplXslPage" 
     140                                                        resultXslMethod="{resultatAgent('//standard/xslMethod')}" 
     141                                                        templateXslPath="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}.xsl" 
    166142                                                        resultEncoding="UTF-8" 
    167                                                         resultExtension="{si(resultatAgent('//standard/xslMethod') = 'html', '.html', '.xhtml')}" 
    168                                                         dialogHierContextual="true"> 
    169                                                  
    170                                                 <!-- les destUrlXxxx ici sont des pubUriXxxx dans le générateur créé  
    171                                                 <property key="pubUriRes" value="{resultatDialogue('.../destUrlTemplateResInSite')}"/> 
    172                                                 <property key="pubUriStyle" value="{resultatDialogue('.../destUrlStyle')}"/> 
    173                                                 --> 
     143                                                        dialogHierContextual="true" 
     144                                                        resultIndent="true"> 
     145                                                        <xsl:choose> 
     146                                                                <xsl:when test="resultatAgent('//standard/xslMethod') = 'html'"> 
     147                                                                        <xsl:attribute name="resultExtension">.html</xsl:attribute> 
     148                                                                        <xsl:attribute name="resultDocTypePublic">-//W3C//DTD HTML 4.01 Transitional//EN</xsl:attribute> 
     149                                                                        <xsl:if test="resultatAgent('//standard/doctypeUri') != 'no'"> 
     150                                                                                <xsl:attribute name="resultDocTypeSystem">http://www.w3.org/TR/html4/loose.dtd</xsl:attribute> 
     151                                                                        </xsl:if> 
     152                                                                </xsl:when> 
     153                                                                <xsl:otherwise> 
     154                                                                        <xsl:attribute name="resultExtension">.xhtml</xsl:attribute> 
     155                                                                        <xsl:attribute name="resultDocTypePublic">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:attribute> 
     156                                                                        <xsl:if test="resultatAgent('//standard/doctypeUri') != 'no'"> 
     157                                                                                <xsl:attribute name="resultDocTypeSystem">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:attribute> 
     158                                                                        </xsl:if> 
     159                                                                </xsl:otherwise> 
     160                                                        </xsl:choose> 
     161                                                        <postXsl path="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}_postXsl_xhtml.xsl"/> 
    174162                                        </template> 
    175163                                </xsl:template> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_armoireUiTemplate/template.xsl.xsl

    r10307 r10487  
    4646                xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias"  
    4747                xmlns:java="http://xml.apache.org/xslt/java"  
    48                 exclude-result-prefixes="sm sc xsl java" 
     48                exclude-result-prefixes="sm sc xsl" 
    4949                version="1.0"> 
    5050 
    51         <xsl0:import href="bsco:sm/web/sm_WLink.xml.xsl"/> 
    52  
    53         <xsl0:output indent="no"/> 
     51        <xsl0:import href="bsco:sm/webSiteTemplate/template.xsl.xsl"/> 
     52 
     53        <xsl0:output method="xml" indent="no" encoding="UTF-8"/> 
     54        <xsl0:namespace-alias stylesheet-prefix="xsl" result-prefix="xsl0"/> 
    5455         
    5556        <xsl0:param name="vDialog"/> 
    5657        <xsl0:param name="vAgent"/> 
    5758         
    58         <xsl0:variable name="vCodeTemplate" select="resultatDialogue('.../codeTemplate')"/> 
    59  
    6059        <xsl0:template match="sm:armoireUiTemplate"> 
    61  
    62                 <!-- Parcours des transformers pour les inclusions --> 
    63                 <xsl0:value-of select="execute( 
    64                     initBuffer('checkBlock', java:java.util.HashSet.new()),  
    65                     resultatAgent('//agentGenerator', 'fillBuffersPostXslFragmentXhtml:xhtml'), 
    66                     resultatAgent('//agentGenerator', 'fillBufferCoLib'), 
    67                     si(.//sm:link[@target='subWindow'], resultatAgent('//agentGenerator', 'fillBufferDynUiMgr')) 
    68                    )"/>                  
    69                 <xsl0:variable name="pathFillBuffer" select="concat('templatesCalled/', resultatDialogue('.../codeTemplate'), '/fillBuffers')"/> 
    70                 <!-- Parcours tous les transformer pour trouver ceux qui exploitent ce template --> 
    71                 <xsl0:for-each select="agentsLies(dialog('...//linksTransf'))"> 
    72                         <!-- Source:<xsl0:value-of select="pathAgent(.)"/> - agentFillBuffer : <xsl0:value-of select="pathAgent(agent($pathFillBuffer, .))"/> --> 
    73                         <xsl0:value-of select="resultatAgent(agent($pathFillBuffer, .))"/> 
    74                 </xsl0:for-each> 
    75                 <!-- Parcours tous les transformers et widgets directement appelés par le template --> 
    76                 <xsl0:for-each select="parseXml(resultatAgent('//calledStylableList'))/liste/item"> 
    77                         <xsl0:value-of select="resultatAgent(concat(., '/fillBuffers'))"/> 
    78                 </xsl0:for-each> 
    79                 <xsl0:value-of select="initBuffer('checkBlock')"/> 
    80                 <!-- Ajout des traitements dynamiques XSL au chargelent de la page dans les browsers 
    81                                 cf. http://www.w3.org/Math/XSL/ 
    82                  --> 
    83                 <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
    84                         <!-- copie des ressources --> 
    85                         <xsl0:variable name="vMmlXslPath" select="resultatAgent('//',  
    86                                                                                                                 concat( 
    87                                                                                                                         'res:src=bsco:sm/webSiteTemplate/mml',  
    88                                                                                                                         resultatAgent(srcPathFolder),  
    89                                                                                                                         ';mutabledst=', 
    90                                                                                                                         'ui.doss/site/lib/mml' 
    91                                                                                                                 ))"/> 
    92                         <!-- Déclaration des XSL : résolu coté wm --> 
    93                         <xsl0:text disable-output-escaping="yes"><![CDATA[<?xml-stylesheet type="text/xsl" href="$vGeneratorUtils.translatePubUri2DestUrl(']]></xsl0:text><xsl0:value-of select="$vMmlXslPath"/><xsl0:text disable-output-escaping="yes"><![CDATA[/pmathml.xsl')"?>]]></xsl0:text> 
    94                 </xsl0:if> 
    95                 <!-- Contenu --> 
    96                 <html> 
    97                         <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
    98                                 <xsl0:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl0:attribute> 
    99                         </xsl0:if> 
    100                         <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
    101                         <xsl0:attribute name="xmlns:math">http://www.w3.org/1998/Math/MathML</xsl0:attribute> 
    102                         </xsl0:if> 
    103                         <xsl0:if test="resultatAgent('//standard/svgNamespace') = 'yes'"> 
    104                                 <xsl0:attribute name="xmlns:svg">http://www.w3.org/2000/svg</xsl0:attribute> 
    105                         </xsl0:if> 
    106                         <xsl0:if test="resultatAgent('//agentGenerator', 'debug') != 'no'"> 
    107                                 <xsl0:comment> 
    108                                         standard : <xsl0:value-of select="resultatAgent('//standard')"/> 
    109                                         dialog : $vDialog.hGetUrlInInstance() 
    110                                         outline :  
    111                                         $vGeneratorUtils.resultatAgent(null, "outline:ancestors-siblings;descendants;") 
    112                                 </xsl0:comment> 
    113                         </xsl0:if><xsl0:text> 
    114 </xsl0:text> 
    115                         <head><xsl0:text> 
    116 </xsl0:text> 
    117         <xsl0:variable name="vWinTitle"><xsl0:apply-templates select="sm:windowTitle/*"  mode="titlebuilder"/></xsl0:variable> 
    118         <title><xsl0:value-of select="normalize-space($vWinTitle)"/></title><xsl0:text> 
    119 </xsl0:text> 
    120 <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
    121         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><xsl0:text> 
    122 </xsl0:text> 
    123 </xsl0:if> 
    124  
    125 <xsl0:if test="@blockCache!='no'"> 
    126 <!-- Elimination des caches clients --> 
    127         <meta http-equiv="Cache-Control" content="no-cache"/><xsl0:text> 
    128 </xsl0:text> 
    129         <meta http-equiv="Pragma" content="no-cache"/><xsl0:text> 
    130 </xsl0:text> 
    131         <meta http-equiv="expires" name="Expires" content="Fri, 01 Jan 1990 00:00:00 GMT"/><xsl0:text> 
    132 </xsl0:text> 
    133         <meta http-equiv="Content-Style-Type" content="text/css"/> 
    134 </xsl0:if> 
    135 <xsl0:apply-templates select="sm:metaTags/*" mode="metaTags"/><xsl0:text> 
    136  
    137 </xsl0:text>#set $destUrlTemplateResInSite = "<xsl0:value-of select="resultatAgent('templateResources')"/>" 
    138 <xsl0:if test="count(sm:resources/@favicon)!=0"><xsl0:text> 
    139 </xsl0:text><link rel="shortcut icon" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlTemplateResInSite)/{sm:resources/@favicon}" type="image/x-icon"/> 
    140 </xsl0:if> 
    141 (!(inc=css.withTag)!)<!-- Inclusions CSS issues des transformers --> 
    142 (!(inc=css.link)!) 
    143 <xsl0:variable name="vDestUrlStyle" select="resultatDialogue('.../destUrlStyle')"/><!-- Customizables Styles du modèle--> 
    144 <xsl0:if test="$vDestUrlStyle">#set $destUrlStyle = "<xsl0:value-of select="$vDestUrlStyle"/>" 
    145 <link rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlStyle)" type="text/css"/><xsl0:text> 
    146 </xsl0:text> 
    147 </xsl0:if> 
    148                                  
    149 <xsl0:value-of select="resultatDialogue('.../initUiServices')" disable-output-escaping="yes"/><!-- Initialisation du scContext et des services --> 
    150 (!(inc=js.withTag)!)<!-- Inclusions JS issues des transformers --> 
    151 (!(inc=js.link)!)        
    152 <xsl0:apply-templates select="sm:styles/*" mode="styles"/> 
    153 </head><xsl0:text> 
    154 </xsl0:text> 
    155 <body><xsl0:text> 
    156 </xsl0:text> 
    157         <div id="pageBody"> 
    158                 <xsl0:apply-templates select="sm:headerOut"/> 
    159                 <div id="container_1"><div id="container_2"><div id="container_3"><div id="container_4"><div id="container_5"> 
    160                         <xsl0:apply-templates select="sm:container/sm:headerIn"/> 
    161                         <xsl0:apply-templates select="sm:container/sm:mainArea"/> 
    162                         <xsl0:apply-templates select="sm:container/sm:footerIn"/> 
    163                 </div></div></div></div></div> 
    164                 <xsl0:apply-templates select="sm:footerOut"/> 
    165         </div><xsl0:text> 
    166 </xsl0:text> 
    167 </body><xsl0:text> 
    168 </xsl0:text> 
    169 </html> 
     60                 
     61                <xsl0:call-template name="initBuffers"/> 
     62                 
     63                <xsl:stylesheet version="1.0" exclude-result-prefixes="java"> 
     64                        <xsl:output method="xml" indent="no" encoding="UTF-8"/> 
     65                        <xsl:param name="vDialog"/> 
     66                        <xsl:param name="vAgent"/> 
     67                        <xsl:template match="*"> 
     68                 
     69                                <!-- Ajout des traitements dynamiques XSL au chargelent de la page dans les browsers 
     70                                                cf. http://www.w3.org/Math/XSL/ 
     71                                 --> 
     72                                <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
     73                                        <!-- copie des ressources --> 
     74                                        <xsl0:variable name="vMmlXslPath" select="resultatAgent('//',  
     75                                                                                                concat( 
     76                                                                                                        'res:src=bsco:sm/webSiteTemplate/mml',  
     77                                                                                                        resultatAgent(srcPathFolder),  
     78                                                                                                        ';mutabledst=', 
     79                                                                                                        'ui.doss/site/lib/mml' 
     80                                                                                                ))"/> 
     81                                        <!-- Déclaration de la xsl math --> 
     82                                        <xsl:processing-instruction name="xml-stylesheet">type="text/xsl" href="<xsl:value-of select="translatePubPath2DestUrl(&quot;{$vMmlXslPath}/pmathml.xsl&quot;)"/>"</xsl:processing-instruction> 
     83                                </xsl0:if> 
     84                                <!-- Contenu --> 
     85                                <html> 
     86                                        <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
     87                                                <xsl0:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl0:attribute> 
     88                                        </xsl0:if> 
     89                                        <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
     90                                                <xsl0:attribute name="xmlns:math">http://www.w3.org/1998/Math/MathML</xsl0:attribute> 
     91                                        </xsl0:if> 
     92                                        <xsl0:if test="resultatAgent('//standard/svgNamespace') = 'yes'"> 
     93                                                <xsl0:attribute name="xmlns:svg">http://www.w3.org/2000/svg</xsl0:attribute> 
     94                                        </xsl0:if> 
     95                                        <xsl0:if test="resultatAgent('//agentGenerator', 'debug') != 'no'"> 
     96                                                <xsl:comment> 
     97                                                        standard : <xsl0:value-of select="resultatAgent('//standard')"/> 
     98                                                        dialog : <xsl:value-of select="pathDialogAgent($vDialog)"/> 
     99                                                        outline :  
     100                                                        <xsl:value-of select="resultatAgent($vDialog, 'outline:ancestors-siblings;descendants;')"/> 
     101                                                </xsl:comment> 
     102                                        </xsl0:if> 
     103                                        <head> 
     104                                                <xsl:variable name="vWinTitle"><xsl0:apply-templates select="sm:windowTitle/*"/></xsl:variable> 
     105                                                <title><xsl:value-of select="normalize-space($vWinTitle)"/></title> 
     106                                                <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
     107                                                        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
     108                                                </xsl0:if> 
     109                                         
     110                                                <xsl0:if test="@blockCache!='no'"> 
     111                                                        <!-- Elimination des caches clients --> 
     112                                                        <meta http-equiv="Cache-Control" content="no-cache"/> 
     113                                                        <meta http-equiv="Pragma" content="no-cache"/> 
     114                                                        <meta http-equiv="expires" name="Expires" content="Fri, 01 Jan 1990 00:00:00 GMT"/> 
     115                                                </xsl0:if> 
     116                                                <meta http-equiv="Content-Style-Type" content="text/css"/> 
     117                                                <xsl0:apply-templates select="sm:metaTags/*" mode="metaTags"/> 
     118                                                <xsl0:if test="sm:resources/@favicon"> 
     119                                                        <link type="image/x-icon" rel="shortcut icon" href="{{translatePubPath2DestUrl(&quot;{$vDestUrlTemplateResInSite}/{sm:resources/@favicon}&quot;)}}"/> 
     120                                                </xsl0:if> 
     121                                                (!(inc=css.withTag)!)<!-- Inclusions CSS issues des transformers --> 
     122                                                (!(inc=css.link)!) 
     123                                                <xsl0:value-of select="resultatDialogue('.../initUiServices')" disable-output-escaping="yes"/><!-- Initialisation du scContext et des services --> 
     124                                                (!(inc=js.withTag)!)<!-- Inclusions JS issues des transformers --> 
     125                                                (!(inc=js.link)!)        
     126                                                <xsl0:apply-templates select="sm:styles/*"/> 
     127                                        </head> 
     128                                        <body> 
     129                                                <div id="pageBody"> 
     130                                                        <xsl0:apply-templates select="sm:headerOut"/> 
     131                                                        <div id="container_1"><div id="container_2"><div id="container_3"><div id="container_4"><div id="container_5"> 
     132                                                                <xsl0:apply-templates select="sm:container/sm:headerIn"/> 
     133                                                                <xsl0:apply-templates select="sm:container/sm:mainArea"/> 
     134                                                                <xsl0:apply-templates select="sm:container/sm:footerIn"/> 
     135                                                        </div></div></div></div></div> 
     136                                                        <xsl0:apply-templates select="sm:footerOut"/> 
     137                                                </div> 
     138                                        </body> 
     139                                </html> 
     140                        </xsl:template> 
     141                </xsl:stylesheet> 
    170142        </xsl0:template> 
    171143         
    172144        <xsl0:template match="sm:headerOut|sm:headerIn|sm:mainArea|sm:footerIn|sm:footerOut"> 
    173 <!--            <div id="{local-name(.)}"> --> 
    174145                        <xsl0:choose> 
    175146                                <!-- LAYOUT DIV --> 
     
    221192<!--            </div> --> 
    222193        </xsl0:template> 
    223  
    224         <xsl0:template match="sm:callMainZone">(!(inc=zone.mainZone.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>)!)</xsl0:template> 
    225         <xsl0:template match="sm:callOutline">$(vGeneratorUtils.executeXsl("outline<xsl0:value-of select="getIdNode(.)"/>.xsl", $vGeneratorUtils.resultatAgent(null, "outline:ancestors-siblings;descendants;"), null))</xsl0:template> 
    226         <xsl0:template match="sm:callZone">(!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>)!)</xsl0:template> 
    227         <xsl0:template match="sm:callRootModel"> 
    228                 <xsl0:choose> 
    229                         <xsl0:when test="not(@format!='xhtml')">(!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null, '<zoneContent>', '</zoneContent>'))!)</xsl0:when> 
    230                         <xsl0:otherwise>(!(inc=evalWm.<xsl0:value-of select="@format"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null, '<zoneContent>', '</zoneContent>'))!)</xsl0:otherwise> 
    231                 </xsl0:choose>           
    232         </xsl0:template>         
    233         <!-- Projet d'implémentation sm:callModel/sm:root, sm:callModel/sm:current ... 
    234         <xsl0:template match="sm:callModel"><xsl0:apply-templates/></xsl0:template> 
    235         <xsl0:template match="sm:root">(!(inc=evalWm.xhtml.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null, '<zoneContent>', '</zoneContent>'))!)</xsl0:template>  
    236         <xsl0:template match="sm:current">(!(inc=evalWm.xhtml.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent(concat($vGeneratorUtils.switchAxis($vAgent.hGetAgentPrinc().hGetCode(), '<xsl0:value-of select="@axis"/>'), '/xhtmlContent'), null, '<zoneContent>', '</zoneContent>'))!)</xsl0:template>   
    237         --> 
    238                   
    239194                  
    240195        <!-- sm:WText ===================================================================== --> 
     
    243198        </xsl0:template> 
    244199 
    245         <!-- sm:WXhtmlFragment ===================================================================== --> 
    246         <xsl0:template match="sm:WXhtmlFragment"> 
    247                 <xsl0:value-of select="." disable-output-escaping="yes"/> 
    248         </xsl0:template> 
    249  
    250         <!-- sm:Widget ===================================================================== --> 
    251         <xsl0:template match="sm:Widget"> 
    252                 <xsl0:choose> 
    253                         <xsl0:when test="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/contentFormat'))='xhtml'">(!(inc=evalWm.xhtml.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent("/@@/tplWidget_<xsl0:value-of select="getIdFromPath(@sc:refUri)"/>", null, "<zoneContent>", "</zoneContent>"))!)</xsl0:when> 
    254                         <xsl0:otherwise>$vGeneratorUtils.resultatAgent("/@@/tplWidget_<xsl0:value-of select="getIdFromPath(@sc:refUri)"/>", null)</xsl0:otherwise> 
    255                 </xsl0:choose> 
    256         </xsl0:template>         
    257  
    258200        <!-- sm:WImage ===================================================================== --> 
    259201        <xsl0:template match="sm:WImage"> 
    260 #set $pubUriImage = "<xsl0:value-of select="resultatAgent('//', 
    261                                                                                                                         concat( 
    262                                                                                                                                 'res:src=wsp:',  
    263                                                                                                                                 @sc:refUri,  
    264                                                                                                                                 ';mutabledst=', 
    265                                                                                                                                 resultatDialogue('.../destPathTemplateResInSite'), 
    266                                                                                                                                 '/', 
    267                                                                                                                                 java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
    268                                                                                                                         ))"/>" 
    269 <img src="$vGeneratorUtils.translatePubUri2DestUrl($pubUriImage)" alt="{@altText}"> 
     202<img src="{{translatePubPath2DestUrl(&quot;{ 
     203                                resultatAgent('//', 
     204                                concat( 
     205                                        'res:src=wsp:',  
     206                                        @sc:refUri,  
     207                                        ';mutabledst=', 
     208                                        resultatDialogue('.../destPathTemplateResInSite'), 
     209                                        '/', 
     210                                        java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
     211                                )) 
     212                        }&quot;)}}" alt="{@altText}"> 
    270213                        <xsl0:call-template name="classAtt"/> 
    271214                        <xsl0:call-template name="idAtt"/></img> 
     
    289232                </span> 
    290233        </xsl0:template> 
    291  
    292         <!-- sm:WLink ===================================================================== --> 
    293         <xsl0:template match="sm:WLink"> 
    294                 <xsl0:variable name="vOptions"> 
    295                         <xsl0:call-template name="linkOptions"/><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    296                 </xsl0:variable> 
    297                 <a> 
    298                         <xsl0:call-template name="linkHref"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    299                                 <xsl0:with-param name="pUrl"><xsl0:apply-templates mode="wlinkUrl" select="sm:link/*"/></xsl0:with-param> 
    300                                 <xsl0:with-param name="pOptions"><xsl0:value-of select="$vOptions"/></xsl0:with-param> 
    301                         </xsl0:call-template> 
    302                         <xsl0:call-template name="classAtt"/> 
    303                         <xsl0:call-template name="idAtt"/> 
    304                         <xsl0:if test="count(sm:labelTitle) != 0"> 
    305 <!--                            <xsl0:variable name="vlabelTitle"><xsl0:apply-templates select="sm:labelTitle/*"/></xsl0:variable> 
    306                                 <xsl0:attribute name="title"><xsl0:value-of select="string(parseXml($vlabelTitle))"/></xsl0:attribute> 
    307  -->                            <xsl0:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/*"/></xsl0:attribute> 
    308                         </xsl0:if> 
    309                         <xsl0:choose> 
    310                                 <xsl0:when test="count(sm:label/*) = 0">&#160;</xsl0:when> 
    311                                 <xsl0:otherwise><span><xsl0:apply-templates select="sm:label/*"/></span></xsl0:otherwise> 
    312                         </xsl0:choose></a> 
    313         </xsl0:template> 
    314         <xsl0:template match="sm:fixedURL" mode="wlinkUrl"><xsl0:value-of select="@url"/></xsl0:template> 
    315         <xsl0:template match="sm:next" mode="wlinkUrl">$vDialog.hGetResultat('act:cdaction=GoToNext')</xsl0:template> 
    316         <xsl0:template match="sm:previous" mode="wlinkUrl">$vDialog.hGetResultat('act:cdaction=GoToPrec')</xsl0:template> 
    317         <xsl0:template match="sm:home" mode="wlinkUrl">$vGeneratorUtils.resultatDialog('/@@','act:')</xsl0:template> 
    318         <xsl0:template match="*|text()|@*" mode="wlinkUrl"/> 
    319  
    320         <!-- sm:WButton ===================================================================== --> 
    321         <xsl0:template match="sm:WButton"> 
    322                 <a href="javascript:void(0);"> 
    323                         <xsl0:attribute name="onclick"> 
    324                                 <xsl0:choose> 
    325                                         <xsl0:when test="sm:action/sm:close">window.top.close();</xsl0:when> 
    326                                         <xsl0:when test="sm:action/sm:print">window.print();</xsl0:when> 
    327                                         <xsl0:when test="sm:action/sm:jsFragment"><xsl0:value-of select="sm:action/sm:jsFragment/@command"/></xsl0:when> 
    328                                 </xsl0:choose> 
    329                         </xsl0:attribute> 
    330                         <xsl0:call-template name="classAtt"/> 
    331                         <xsl0:call-template name="idAtt"/> 
    332                         <xsl0:if test="count(sm:labelTitle) != 0"> 
    333                                 <xsl0:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/*"/></xsl0:attribute> 
    334                         </xsl0:if> 
    335                         <xsl0:choose> 
    336                                 <xsl0:when test="count(sm:label/*) = 0">&#160;</xsl0:when> 
    337                                 <xsl0:otherwise><span><xsl0:apply-templates select="sm:label/*"/></span></xsl0:otherwise> 
    338                         </xsl0:choose></a> 
    339         </xsl0:template> 
    340  
    341         <!-- sm:WObject ===================================================================== --> 
    342         <xsl0:template match="sm:WObject"> 
    343 #set $pubUriObject = "<xsl0:value-of select="resultatAgent('//', 
    344                                                                                                                         concat( 
    345                                                                                                                                 'res:src=wsp:',  
    346                                                                                                                                 @sc:refUri,  
    347                                                                                                                                 ';mutabledst=', 
    348                                                                                                                                 resultatDialogue('.../destPathTemplateResInSite'), 
    349                                                                                                                                 '/', 
    350                                                                                                                                 java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
    351                                                                                                                         ))"/>" 
    352 <object codebase="{sm:codebase/@value}" classid="{sm:classid/@value}" height="{sm:height/sm:fixedValue/@value}" width="{sm:width/sm:fixedValue/@value}"> 
    353                         <xsl0:call-template name="classAtt"/> 
    354                         <xsl0:call-template name="idAtt"/> 
    355                         <param name="src" value="$vGeneratorUtils.translatePubUri2DestUrl($pubUriObject)"/> 
    356                         <xsl0:apply-templates select="sm:param" mode="objParams"/> 
    357                         <embed pluginspage="{sm:pluginspage/@value}" height="{sm:height/sm:fixedValue/@value}" width="{sm:width/sm:fixedValue/@value}" type="{sm:type/@value}" src="$vGeneratorUtils.translatePubUri2DestUrl($pubUriObject)"> 
    358                                 <xsl0:call-template name="classAtt"/> 
    359                                 <xsl0:if test="@id"> 
    360                                         <xsl0:attribute name="name"><xsl0:value-of select="@id"/></xsl0:attribute> 
    361                                 </xsl0:if> 
    362                                 <xsl0:apply-templates select="sm:param" mode="objParamsEmbedAtts"/> 
    363                         </embed> 
    364                         <xsl0:if test="count(sm:altContent)!=0"> 
    365                                 <noembed> 
    366                                         <xsl0:apply-templates select="sm:altContent/*"/> 
    367                                 </noembed>       
    368                         </xsl0:if> 
    369                 </object> 
    370         </xsl0:template> 
    371  
    372         <xsl0:template match="sm:param" mode="objParams"> 
    373                 <param name="{@name}"> 
    374                         <xsl0:attribute name="value"><xsl0:apply-templates mode="xhtmlUrl"/></xsl0:attribute> 
    375                 </param>  
    376         </xsl0:template> 
    377         <xsl0:template match="node()" mode="objParams"/> 
    378  
    379         <xsl0:template match="sm:param" mode="objParamsEmbedAtts"> 
    380                 <xsl0:attribute name="{@name}"><xsl0:apply-templates mode="xhtmlUrl"/></xsl0:attribute> 
    381         </xsl0:template> 
    382         <xsl0:template match="node()" mode="objParamsEmbedAtts"/> 
    383  
    384         <xsl0:template match="sm:fixedValue" mode="xhtmlUrl"><xsl0:value-of select="@value"/></xsl0:template> 
    385         <xsl0:template match="node()" mode="xhtmlUrl"/> 
    386  
    387         <xsl0:template match="sm:title"> 
    388                 <xsl0:apply-templates mode="titlebuilder"/> 
    389         </xsl0:template> 
    390          
    391         <!-- titlebuilder ===================================================================== --> 
    392         <xsl0:template match="sm:rootTitle" mode="titlebuilder"> 
    393                 <xsl0:choose> 
    394                         <xsl0:when test="@type='shortTitle'">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot("<xsl0:value-of select="getAxisSuffix(@axis)"/>/shortTitleText"), null))</xsl0:when> 
    395                         <xsl0:otherwise>$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot("<xsl0:value-of select="getAxisSuffix(@axis)"/>/fullTitleText"), null))</xsl0:otherwise> 
    396                 </xsl0:choose> 
    397         </xsl0:template> 
    398         <xsl0:template match="sm:pageTitle" mode="titlebuilder">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.getTitleAgent($vAgent))</xsl0:template> 
    399         <xsl0:template match="sm:fixedString" mode="titlebuilder"><xsl0:value-of select="@value"/></xsl0:template> 
    400         <xsl0:template match="sm:callZone" mode="titlebuilder">(!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'text')"/>.text)!)</xsl0:template> 
    401         <xsl0:template match="sm:callRootModel" mode="titlebuilder">(!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'text')"/>.text.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null))!)</xsl0:template> 
    402         <xsl0:template match="*|text()|@*" mode="titlebuilder"/> 
    403          
    404         <!-- metaTags ===================================================================== --> 
    405         <xsl0:template match="sm:meta" mode="metaTags"><xsl0:text> 
    406 </xsl0:text><meta name="{@name}"><xsl0:attribute name="content"><xsl0:apply-templates mode="metaTags"/></xsl0:attribute></meta> 
    407         </xsl0:template> 
    408         <xsl0:template match="sm:fixedContent" mode="metaTags"><xsl0:value-of select="@value"/></xsl0:template> 
    409         <xsl0:template match="sm:callZone" mode="metaTags">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>((!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'text')"/>.text)!))</xsl0:template> 
    410         <xsl0:template match="sm:callRootModel" mode="metaTags">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>((!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'text')"/>.text.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null))!))</xsl0:template> 
    411         <xsl0:template match="*|text()|@*" mode="metaTags"/> 
    412          
    413         <!-- styleSheetTags ===================================================================== --> 
    414         <xsl0:template match="sm:styleSheet" mode="styles"><link type="text/css" rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlTemplateResInSite)/{@src}"><xsl0:if test="@media"><xsl0:attribute name="media"><xsl0:value-of select="@media"/></xsl0:attribute></xsl0:if></link><xsl0:text> 
    415 </xsl0:text></xsl0:template> 
    416         <xsl0:template match="sm:styleSheet[@srcFrom='publishFiles']" mode="styles"> 
    417 #set $pubUriStyle = "/<xsl0:value-of select="@src"/>" 
    418 <link type="text/css" rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($pubUriStyle)"><xsl0:if test="@media"><xsl0:attribute name="media"><xsl0:value-of select="@media"/></xsl0:attribute></xsl0:if></link><xsl0:text> 
    419 </xsl0:text></xsl0:template> 
    420         <xsl0:template match="*|text()|@*" mode="styles"/> 
    421          
    422         <!-- Class & Id attibute helper templates ===================================================================== --> 
    423         <xsl0:template name="classAtt"> 
    424                 <xsl0:if test="@class"> 
    425                         <xsl0:attribute name="class"><xsl0:value-of select="@class"/></xsl0:attribute> 
    426                 </xsl0:if> 
    427         </xsl0:template> 
    428         <xsl0:template name="idAtt"> 
    429                 <xsl0:if test="@id"> 
    430                         <xsl0:attribute name="id"><xsl0:value-of select="@id"/></xsl0:attribute> 
    431                 </xsl0:if> 
    432         </xsl0:template> 
    433                  
     234         
    434235        <xsl0:template match="*|text()|@*"/> 
    435236</xsl0:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_freeUiTemplate.xml

    r10307 r10487  
    5656                        - resultatDialogue('.../destPathTemplate') pour le path du dossier de destination du template. 
    5757                        - resultatDialogue('.../destPathTemplateResInSite') pour l'uri du dossier de destination des ressources du site de ce template. 
    58                         - resultatDialogue('.../destUrlStyle') pour intégrer le path vers le fichier de style associé à ce template. 
    5958                 --> 
    6059        <groupAffichage code="publishFile"> 
     
    9897                </valeur> 
    9998                <!-- Création du fichier racine pour le template avec ce code. --> 
    100                 <valeur code="template"> 
    101                         <source type="inclusion-dynamique"> 
    102                                 <source type="xpath-dynamique">si(*[local-name()=resultatDialogue('.../codeTemplate')], concat('[![agent=', resultatDialogue('.../codeTemplate'), ';arguments=act:]!]'), '[![agent=_all_;arguments=act:]!]')</source> 
    103                         </source> 
    104                         <!-- Template WebMacro Html : on passe par un modèle de page pour les buffers. -->               
    105                         <affichage code="templateWmXhtml" racine="sm:templateWebMacroXhtml" codecomposant="si(@code='*', '_all_', @code)"> 
    106                                 <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), '.wm')</urlPage> 
    107                                 <page> 
    108                                         <modele>wmTemplate-xhtml</modele> 
    109                                         <zone cle="listPostXsl" type="xpath-statique">listXmlExpr(sm:postXsl/@key, .)</zone> 
    110                                         <zone cle="mainZone" type="inclusion-dynamique"> 
    111                                                 <source  type="composition-dynamique"> 
    112                                                 <c:composition xmlns:c="composition"> 
    113                                                         <!-- On initialise le buffer 'checkBlock' pour controler le passage unique dans chaque block --> 
    114                                                         <c:donnee type="xpath-dynamique">execute( 
    115                                                                 initBuffer('checkBlock', java:java.util.HashSet.new()), 
    116                                                                 resultatAgent('//agentGenerator', 'fillBuffersPostXslFragmentXhtml:xhtml'), 
    117                                                                 concatExpr(sm:postXsl/sm:freeTemplates, setEntryBuffer(concat('xslFragmentOnZone.', ../@key), string(.))), 
    118                                                                 concatExpr(sm:postXsl/sm:declareNs, setEntryBuffer(concat('xslFragmentOnZone_Ns.', ../@key), string(@prefix), string(@ns))), 
    119                                                                 concatExpr(sm:postXsl/sm:excludeResultPrefix, setEntryBuffer(concat('xslFragmentOnZone_ExcludePrefix.', ../@key), string(@prefix))) 
    120                                                                 ) 
    121                                                         </c:donnee> 
    122                                                         <!-- On inclu le contenu du template WM --> 
    123                                                         <c:donnee type="xpath-dynamique">si(resultatAgent(getContent), resultatAgent('//', resultatAgent(getContent)))</c:donnee> 
    124                                                         <c:agentslies dialogue="...//linksTransf"> 
    125                                                                 <!-- On boucle sur tous les transformers du générateur pour appeler l'agent fillBuffers si ce template est appelé. --> 
    126                                                                 <c:donnee type="xpath-dynamique">resultatAgent(concat('templatesCalled/', resultatDialogue('.../codeTemplate'), '/fillBuffers'))</c:donnee> 
    127                                                         </c:agentslies> 
    128                                                         <!-- Parcours tous les transformers et widgets directement appelés par le template --> 
    129                                                         <c:boucleagents> 
    130                                                                 <c:listeagents type="xpath-dynamique">resultatAgent('//calledStylableList', resultatDialogue('.../codeTemplate'))</c:listeagents> 
    131                                                                 <c:resultat agent="fillBuffers"/>  
    132                                                         </c:boucleagents> 
    133                                                         <!-- On reset le buffer 'checkBlock' --> 
    134                                                         <c:donnee type="xpath-dynamique">initBuffer('checkBlock')</c:donnee> 
    135                                                 </c:composition> 
    136                                                 </source> 
    137                                         </zone> 
    138                                         <zone cle="content-type" type="xpath-statique">concat('text/plain;charset=',@templateEncoding)</zone> 
    139                                 </page> 
    140                                 <valeur code="getContent"> 
    141                                         <source type="xpath-statique">si(sm:contentTemplate/@sc:refUri, concat('get:wsp:', sm:contentTemplate/@sc:refUri, '?contenttype=text/plain;charset=', @templateEncoding))</source> 
    142                                 </valeur> 
    143                         </affichage> 
    144                         <!-- Template WebMacro Simple : simple copie du template. --> 
    145                         <valeur code="templateWm" racine="sm:templateWebMacro" codecomposant="si(@code='*', '_all_', @code)"> 
    146                                 <source type="xpath-dynamique">resultatAgent('//',  
    147                                                                                         concat( 
    148                                                                                                 'res:src=wsp:',  
    149                                                                                                 resultatAgent(srcPathFolder),  
    150                                                                                                 ';dst=', 
    151                                                                                                 resultatDialogue('.../destPathTemplate'),'/', resultatDialogue('.../codeTemplate'), '.wm' 
    152                                                                                         ))</source> 
    153                                 <valeur code="srcPathFolder"> 
    154                                         <source type="xpath-statique">sm:contentTemplate/@sc:refUri</source> 
    155                                 </valeur> 
    156                         </valeur>        
    157                 </valeur> 
     99                <affichage code="template" racine="sm:templateWebMacroXhtml | sm:templateXsl"> 
     100                        <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), si(self::sm:templateWebMacroXhtml, '.wm', '.xsl'))</urlPage> 
     101                        <page> 
     102                                <modele type="xpath-statique">si(self::sm:templateWebMacroXhtml, 'wmTemplate-xhtml', 'xslTemplate-xhtml')</modele> 
     103                                <zone cle="listPostXsl" type="xpath-statique">listXmlExpr(sm:postXsl/@key, .)</zone> 
     104                                <zone cle="mainZone" type="inclusion-dynamique"> 
     105                                        <source  type="composition-dynamique"> 
     106                                        <c:composition xmlns:c="composition"> 
     107                                                <!-- On initialise le buffer 'checkBlock' pour controler le passage unique dans chaque block --> 
     108                                                <c:donnee type="xpath-dynamique">execute( 
     109                                                        initBuffer('checkBlock', java:java.util.HashSet.new()), 
     110                                                        concatExpr(sm:postXsl, si(sm:standardXhtmlTemplates, resultatAgent('//agentGenerator', concat('fillBuffersPostXslFragmentXhtml:', @key)))), 
     111                                                        concatExpr(sm:postXsl/sm:freeTemplates, setEntryBuffer(concat('xslFragmentOnZone.', ../@key), string(.))), 
     112                                                        concatExpr(sm:postXsl/sm:declareNs, setEntryBuffer(concat('xslFragmentOnZone_Ns.', ../@key), string(@prefix), string(@ns))), 
     113                                                        concatExpr(sm:postXsl/sm:excludeResultPrefix, setEntryBuffer(concat('xslFragmentOnZone_ExcludePrefix.', ../@key), string(@prefix))) 
     114                                                        ) 
     115                                                </c:donnee> 
     116                                                <!-- On inclu le contenu du template WM --> 
     117                                                <c:donnee type="xpath-dynamique">si(resultatAgent(getContent), resultatAgent('//', resultatAgent(getContent)))</c:donnee> 
     118                                                <c:agentslies dialogue="...//linksTransf"> 
     119                                                        <!-- On boucle sur tous les transformers du générateur pour appeler l'agent fillBuffers si ce template est appelé. --> 
     120                                                        <c:donnee type="xpath-dynamique">resultatAgent(concat('templatesCalled/', resultatDialogue('.../codeTemplate'), '/fillBuffers'))</c:donnee> 
     121                                                </c:agentslies> 
     122                                                <!-- Parcours tous les transformers et widgets directement appelés par le template --> 
     123                                                <c:boucleagents> 
     124                                                        <c:listeagents type="xpath-dynamique">resultatAgent('//calledStylableList', resultatDialogue('.../codeTemplate'))</c:listeagents> 
     125                                                        <c:resultat agent="fillBuffers"/>  
     126                                                </c:boucleagents> 
     127                                                <!-- On reset le buffer 'checkBlock' --> 
     128                                                <c:donnee type="xpath-dynamique">initBuffer('checkBlock')</c:donnee> 
     129                                        </c:composition> 
     130                                        </source> 
     131                                </zone> 
     132                                <zone cle="content-type" type="xpath-statique">concat('text/plain;charset=',@templateEncoding)</zone> 
     133                        </page> 
     134                        <valeur code="getContent"> 
     135                                <source type="xpath-statique">si(sm:contentTemplate/@sc:refUri, concat('get:wsp:', sm:contentTemplate/@sc:refUri, '?contenttype=text/plain;charset=', @templateEncoding))</source> 
     136                        </valeur> 
     137                </affichage> 
    158138        </groupAffichage> 
    159139         
     
    177157                        - resultatDialogue('.../destUrlTemplateResInSite'). 
    178158                        - resultatDialogue('.../destUrlTemplateFolder'). 
    179                         - resultatDialogue('.../destUrlStyle'). 
    180159        --> 
    181         <valeur code="templateDefinition"> 
    182                 <source type="inclusion-dynamique"> 
    183                         <source type="xpath-dynamique">si(*[local-name()=resultatDialogue('.../codeTemplate')], concat('[![agent=', resultatDialogue('.../codeTemplate'), ']!]'), '[![agent=_all_]!]')</source> 
     160        <!-- TemplateDef pour les Xsl. --> 
     161        <valeur code="templateDefinitionXsl" racine="sm:templateXsl" codecomposant="'templateDefinition'"> 
     162                <source type="xslOnSrc-dynamique"> 
     163                        <xsl:stylesheet  
     164                                        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
     165                                        xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling"  
     166                                        version="1.0"> 
     167                                <xsl:output method="xml" omit-xml-declaration="yes"/> 
     168                                <xsl:param name="vDialog"/> 
     169                                <xsl:param name="vAgent"/> 
     170                                <xsl:variable name="vCodeTemplate" select="resultatDialogue('.../codeTemplate')"/> 
     171                                <xsl:template match="sm:templateXsl"> 
     172                                        <template  
     173                                                        code="{$vCodeTemplate}"  
     174                                                        className="com.scenari.m.ge.pages.TplXslPage" 
     175                                                        templateXslPath="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}.xsl" 
     176                                                        resultEncoding="{@resultEncoding}" 
     177                                                        resultExtension="{@resultExtension}" 
     178                                                        resultXslMethod="{@resultXslMethod}" 
     179                                                        resultDocTypePublic="{@resultDocTypePublic}" 
     180                                                        resultDocTypeSystem="{@resultDocTypeSystem}" 
     181                                                        resultIndent="true" 
     182                                                        dialogHierContextual="{si(@pageUnicityCriterion='none', 'false', 'true')}"> 
     183                                                        <xsl:for-each select="sm:postXsl"> 
     184                                                                <postXsl path="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}_postXsl_{@key}.xsl"/> 
     185                                                        </xsl:for-each> 
     186                                        </template> 
     187                                </xsl:template> 
     188                        </xsl:stylesheet> 
    184189                </source> 
    185                 <!-- TemplateDef pour les WebMacro et les WebMacroXhtml. --> 
    186                 <valeur code="templateDefinitionWm" racine="sm:templateWebMacro | sm:templateWebMacroXhtml" codecomposant="si(@code='*', '_all_', @code)"> 
    187                         <source type="xsl-dynamique"> 
    188                                 <xsl:stylesheet  
    189                                                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    190                                                 version="1.0"> 
    191                                         <xsl:output method="xml" omit-xml-declaration="yes"/> 
    192                                         <xsl:param name="vDialog"/> 
    193                                         <xsl:param name="vAgent"/> 
    194                                         <xsl:variable name="vCodeTemplate" select="resultatDialogue('.../codeTemplate')"/> 
    195                                         <xsl:template match="*"> 
    196                                                 <template  
    197                                                                 code="{$vCodeTemplate}"  
    198                                                                 className="com.scenari.m.ge.pages.WmPage" 
    199                                                                 templateUri="{concat(resultatDialogue('.../destUrlTemplateFolder'), '/', $vCodeTemplate, '.wm')}" 
    200                                                                 templateEncoding="{resultatAgent(templateEncoding)}" 
    201                                                                 resultEncoding="{resultatAgent(resultEncoding)}" 
    202                                                                 resultExtension="{resultatAgent(resultExtension)}" 
    203                                                                 dialogHierContextual="{resultatAgent(isDialogHierContextual)}"> 
    204                                                         <!-- les destUrlXxxx ici sont des pubUriXxxx dans le générateur créé --> 
    205                                                         <property key="pubUriRes" value="{resultatDialogue('.../destUrlTemplateResInSite')}"/> 
    206                                                         <property key="pubUriStyle" value="{resultatDialogue('.../destUrlStyle')}"/> 
    207                                                 </template> 
    208                                         </xsl:template> 
    209                                 </xsl:stylesheet> 
    210                         </source> 
    211                         <valeur code="templateEncoding"> 
    212                                 <source type="xpath-statique">@templateEncoding</source> 
    213                         </valeur> 
    214                         <valeur code="resultEncoding"> 
    215                                 <source type="xpath-statique">@resultEncoding</source> 
    216                         </valeur> 
    217                         <valeur code="resultExtension"> 
    218                                 <source type="xpath-statique">@resultExtension</source> 
    219                         </valeur> 
    220                         <valeur code="isDialogHierContextual"> 
    221                                 <source type="xpath-statique">si(@pageUnicityCriterion='none', 'false', 'true')</source> 
    222                         </valeur> 
     190        </valeur> 
     191        <!-- TemplateDef pour les WebMacro et les WebMacroXhtml. --> 
     192        <valeur code="templateDefinitionWm" racine="sm:templateWebMacroXhtml" codecomposant="'templateDefinition'"> 
     193                <source type="xsl-dynamique"> 
     194                        <xsl:stylesheet  
     195                                        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
     196                                        version="1.0"> 
     197                                <xsl:output method="xml" omit-xml-declaration="yes"/> 
     198                                <xsl:param name="vDialog"/> 
     199                                <xsl:param name="vAgent"/> 
     200                                <xsl:variable name="vCodeTemplate" select="resultatDialogue('.../codeTemplate')"/> 
     201                                <xsl:template match="*"> 
     202                                        <template  
     203                                                        code="{$vCodeTemplate}"  
     204                                                        className="com.scenari.m.ge.pages.WmPage" 
     205                                                        templateUri="{concat(resultatDialogue('.../destUrlTemplateFolder'), '/', $vCodeTemplate, '.wm')}" 
     206                                                        templateEncoding="{resultatAgent(templateEncoding)}" 
     207                                                        resultEncoding="{resultatAgent(resultEncoding)}" 
     208                                                        resultExtension="{resultatAgent(resultExtension)}" 
     209                                                        dialogHierContextual="{resultatAgent(isDialogHierContextual)}"> 
     210                                                <!-- les destUrlXxxx ici sont des pubUriXxxx dans le générateur créé --> 
     211                                                <property key="pubUriRes" value="{resultatDialogue('.../destUrlTemplateResInSite')}"/> 
     212                                        </template> 
     213                                </xsl:template> 
     214                        </xsl:stylesheet> 
     215                </source> 
     216                <valeur code="templateEncoding"> 
     217                        <source type="xpath-statique">@templateEncoding</source> 
     218                </valeur> 
     219                <valeur code="resultEncoding"> 
     220                        <source type="xpath-statique">@resultEncoding</source> 
     221                </valeur> 
     222                <valeur code="resultExtension"> 
     223                        <source type="xpath-statique">@resultExtension</source> 
     224                </valeur> 
     225                <valeur code="isDialogHierContextual"> 
     226                        <source type="xpath-statique">si(@pageUnicityCriterion='none', 'false', 'true')</source> 
    223227                </valeur> 
    224228        </valeur> 
     
    242246                                         
    243247                                <xsl:template match="sm:freeUiTemplate"> 
    244                                         <liste><xsl:apply-templates select="sm:*[@code=string($vArguments)]/*"/></liste> 
    245                                 </xsl:template> 
    246                                 <xsl:template match="sm:calledModels"> 
    247                                         <xsl:apply-templates/> 
    248                                 </xsl:template> 
     248                                        <liste><xsl:apply-templates/></liste> 
     249                                </xsl:template> 
     250                                <xsl:template match="sm:calledModels[@view!='xhtmlContent']"/> 
    249251                                <xsl:template match="sm:root"> 
    250252                                        <xsl:variable name="vAxis" select="@axis"/> 
     
    281283                                         
    282284                                <xsl:template match="sm:freeUiTemplate"> 
    283                                         <xsl:apply-templates select="sm:*[@code=string($vArguments)]/sm:calledModels/*"/> 
     285                                        <xsl:apply-templates/> 
    284286                                </xsl:template> 
    285287                                <xsl:template match="sm:root"> 
     
    301303                Arguments passés : code du template     --> 
    302304        <valeur code="calledZones"> 
    303                 <source type="xpathOnSrc-dynamique">concatExpr(sm:*[@code=string($vArguments)]/sm:calledZone, concat('&lt;callZone key="', @key, '"/&gt;'))</source> 
     305                <source type="xpathOnSrc-dynamique">concatExpr(sm:*/sm:calledZone, concat('&lt;callZone key="', @key, '"/&gt;'))</source> 
    304306        </valeur> 
    305307         
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_openUiTemplate.xml

    r10307 r10487  
    5555        <!-- @API Standard de pulication : HTML, XHTML etc. Surcharge possible de sm:mode/@standard du generator --> 
    5656        <valeur code="standard"> 
    57                         <source type="xpath-dynamique">si(resultatAgent(pageStandard), resultatAgent(pageStandard), resultatAgent('//agentGenerator', 'standard'))</source> 
     57                <source type="xpath-dynamique">si(resultatAgent(pageStandard), resultatAgent(pageStandard), resultatAgent('//agentGenerator', 'standard'))</source> 
    5858                <!-- @API Retourne la méthode de publication des XSL en fonction du standard de publication. --> 
    5959                <valeur code="xslMethod"> 
     
    8787                        - resultatDialogue('.../destPathTemplate') pour le path du dossier de destination du template. 
    8888                        - resultatDialogue('.../destPathTemplateResInSite') pour l'uri du dossier de destination des ressources du site de ce template. 
    89                         - resultatDialogue('.../destUrlStyle') pour intégrer le path vers le fichier de style associé à ce template. 
    9089                 --> 
    9190        <groupAffichage code="publishFile"> 
    92                 <affichage code="templateWmXhtml"> 
    93                         <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), '.wm')</urlPage> 
     91                <affichage code="templateXhtml"> 
     92                        <urlPage type="xpath-dynamique">concat(resultatDialogue('.../destPathTemplate'), '/', resultatDialogue('.../codeTemplate'), '.xsl')</urlPage> 
    9493                        <page> 
    95                                 <modele>wmTemplate-xhtml</modele> 
    96                                 <zone cle="listPostXsl"><liste><item>xhtml</item><item>text</item></liste></zone> 
    97                                 <zone cle="mainZone" type="contextuel-dynamique"> 
    98                                         <choose> 
    99                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'html' and resultatAgent('//standard/doctypeUri') = 'no'" type="xslOnSrc-dynamique" href="bs:templateHtmlDtNoUri.wm.xsl"/> 
    100                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'html'" type="xslOnSrc-dynamique" href="bs:templateHtml.wm.xsl"/> 
    101                                                 <case xpath="resultatAgent('//standard/xslMethod') = 'xml' and resultatAgent('//standard/mmlNamespace') = 'yes'" type="xslOnSrc-dynamique" href="bs:templateXhtmlDtNoUri.wm.xsl"/> 
    102                                                 <default type="xslOnSrc-dynamique" href="bs:templateXhtml.wm.xsl"/> 
    103                                         </choose> 
    104                                 </zone> 
    105                                 <zone cle="content-type">UTF-8</zone> 
     94                                <modele>xslTemplate-xhtml</modele> 
     95                                <zone cle="listPostXsl"><liste><item>xhtml</item></liste></zone> 
     96                                <zone cle="mainZone" type="xslOnSrc-dynamique" href="bs:template.xsl.xsl"/> 
    10697                        </page> 
    10798                        <valeur code="templateResources"> 
     
    131122                        - resultatDialogue('.../destUrlTemplateResInSite'). 
    132123                        - resultatDialogue('.../destUrlTemplateFolder'). 
    133                         - resultatDialogue('.../destUrlStyle'). 
    134124        --> 
    135125        <valeur code="templateDefinition"> 
     
    145135                                        <template  
    146136                                                        code="{$vCodeTemplate}"  
    147                                                         className="com.scenari.m.ge.pages.WmPage" 
    148                                                         templateUri="{concat(resultatDialogue('.../destUrlTemplateFolder'), '/', $vCodeTemplate, '.wm')}" 
    149                                                         templateEncoding="UTF-8" 
     137                                                        dialogHierContextual="{resultatAgent('//isDialogHierContextual')}" 
     138                                                        className="com.scenari.m.ge.pages.TplXslPage" 
     139                                                        resultXslMethod="{resultatAgent('//standard/xslMethod')}" 
     140                                                        templateXslPath="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}.xsl" 
    150141                                                        resultEncoding="UTF-8" 
    151                                                         resultExtension="{si(resultatAgent('//standard/xslMethod') = 'html', '.html', '.xhtml')}" 
    152                                                         dialogHierContextual="{resultatAgent('//isDialogHierContextual')}"> 
    153                                                  
    154                                                 <!-- les destUrlXxxx ici sont des pubUriXxxx dans le générateur créé  
    155                                                 <property key="pubUriRes" value="{resultatDialogue('.../destUrlTemplateResInSite')}"/> 
    156                                                 <property key="pubUriStyle" value="{resultatDialogue('.../destUrlStyle')}"/> 
    157                                                 --> 
     142                                                        resultIndent="true"> 
     143                                                        <xsl:choose> 
     144                                                                <xsl:when test="resultatAgent('//standard/xslMethod') = 'html'"> 
     145                                                                        <xsl:attribute name="resultExtension">.html</xsl:attribute> 
     146                                                                        <xsl:attribute name="resultDocTypePublic">-//W3C//DTD HTML 4.01 Transitional//EN</xsl:attribute> 
     147                                                                        <xsl:if test="resultatAgent('//standard/doctypeUri') != 'no'"> 
     148                                                                                <xsl:attribute name="resultDocTypeSystem">http://www.w3.org/TR/html4/loose.dtd</xsl:attribute> 
     149                                                                        </xsl:if> 
     150                                                                </xsl:when> 
     151                                                                <xsl:otherwise> 
     152                                                                        <xsl:attribute name="resultExtension">.xhtml</xsl:attribute> 
     153                                                                        <xsl:attribute name="resultDocTypePublic">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:attribute> 
     154                                                                        <xsl:if test="resultatAgent('//standard/doctypeUri') != 'no'"> 
     155                                                                                <xsl:attribute name="resultDocTypeSystem">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:attribute> 
     156                                                                        </xsl:if> 
     157                                                                </xsl:otherwise> 
     158                                                        </xsl:choose> 
     159                                                        <postXsl path="{resultatDialogue('.../destUrlTemplateFolder')}/{$vCodeTemplate}_postXsl_xhtml.xsl"/> 
    158160                                        </template> 
    159161                                </xsl:template> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_openUiTemplate/template.xsl.xsl

    r10307 r10487  
    4747                xmlns:java="http://xml.apache.org/xslt/java"  
    4848                xmlns:xhtml="http://www.w3.org/1999/xhtml" 
    49                 exclude-result-prefixes="sm sc xsl java xhtml" 
     49                exclude-result-prefixes="sm sc xsl xhtml" 
    5050                version="1.0"> 
    5151 
    52         <xsl0:import href="bsco:sm/web/sm_WLink.xml.xsl"/> 
     52        <xsl0:import href="bsco:sm/webSiteTemplate/template.xsl.xsl"/> 
    5353 
    54         <xsl0:output indent="no"/> 
     54        <xsl0:output method="xml" indent="no" encoding="UTF-8"/> 
     55        <xsl0:namespace-alias stylesheet-prefix="xsl" result-prefix="xsl0"/> 
    5556         
    5657        <xsl0:param name="vDialog"/> 
    5758        <xsl0:param name="vAgent"/> 
    5859         
    59         <xsl0:variable name="vCodeTemplate" select="resultatDialogue('.../codeTemplate')"/> 
     60        <xsl0:template match="sm:openUiTemplate"> 
     61         
     62                <xsl0:call-template name="initBuffers"/> 
     63                 
     64                <xsl:stylesheet version="1.0" exclude-result-prefixes="java"> 
     65                        <xsl:output method="xml" indent="no" encoding="UTF-8"/> 
     66                        <xsl:param name="vDialog"/> 
     67                        <xsl:param name="vAgent"/> 
     68                        <xsl:template match="*"> 
     69                                <!-- Ajout des traitements dynamiques XSL au chargelent de la page dans les browsers 
     70                                                cf. http://www.w3.org/Math/XSL/ 
     71                                 --> 
     72                                <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
     73                                        <!-- copie des ressources --> 
     74                                        <xsl0:variable name="vMmlXslPath" select="resultatAgent('//',  
     75                                                                                                concat( 
     76                                                                                                        'res:src=bsco:sm/webSiteTemplate/mml',  
     77                                                                                                        resultatAgent(srcPathFolder),  
     78                                                                                                        ';mutabledst=', 
     79                                                                                                        'ui.doss/site/lib/mml' 
     80                                                                                                ))"/> 
     81                                        <!-- Déclaration de la xsl math --> 
     82                                        <xsl:processing-instruction name="xml-stylesheet">type="text/xsl" href="<xsl:value-of select="translatePubPath2DestUrl(&quot;{$vMmlXslPath}/pmathml.xsl&quot;)"/>"</xsl:processing-instruction> 
     83                                </xsl0:if> 
     84                                <!-- Contenu --> 
     85                                <html> 
     86                                        <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
     87                                                <xsl0:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl0:attribute> 
     88                                        </xsl0:if> 
     89                                        <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
     90                                        <xsl0:attribute name="xmlns:math">http://www.w3.org/1998/Math/MathML</xsl0:attribute> 
     91                                        </xsl0:if> 
     92                                        <xsl0:if test="resultatAgent('//standard/svgNamespace') = 'yes'"> 
     93                                                <xsl0:attribute name="xmlns:svg">http://www.w3.org/2000/svg</xsl0:attribute> 
     94                                        </xsl0:if> 
     95                                        <xsl0:if test="resultatAgent('//agentGenerator', 'debug') != 'no'"> 
     96                                                <xsl:comment> 
     97                                                        standard : <xsl0:value-of select="resultatAgent('//standard')"/> 
     98                                                        dialog : <xsl:value-of select="pathDialogAgent($vDialog)"/> 
     99                                                </xsl:comment> 
     100                                        </xsl0:if> 
     101                                        <head> 
     102                                                <xsl:variable name="vWinTitle"><xsl0:apply-templates select="sm:head/sm:windowTitle/*"/></xsl:variable> 
     103                                                <title><xsl:value-of select="normalize-space($vWinTitle)"/></title> 
     104                                                <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
     105                                                        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
     106                                                </xsl0:if> 
     107                                                <xsl0:if test="@blockCache!='no'"> 
     108                                                        <!-- Elimination des caches clients --> 
     109                                                        <meta content="no-cache" http-equiv="Cache-Control"/> 
     110                                                        <meta content="no-cache" http-equiv="Pragma"/> 
     111                                                        <meta content="Fri, 01 Jan 1990 00:00:00 GMT" name="Expires" http-equiv="expires"/> 
     112                                                </xsl0:if> 
     113                                                <meta content="text/css" http-equiv="Content-Style-Type"/> 
     114                                                <xsl0:apply-templates select="sm:head/sm:meta" mode="metaTags"/> 
    60115 
    61         <xsl0:template match="sm:openUiTemplate"> 
    62  
    63                 <!-- Parcours des transformers pour les inclusions --> 
    64                 <xsl0:value-of select="execute( 
    65                     initBuffer('checkBlock', java:java.util.HashSet.new()),  
    66                     resultatAgent('//agentGenerator', 'fillBuffersPostXslFragmentXhtml:xhtml'), 
    67                     resultatAgent('//agentGenerator', 'fillBufferCoLib'), 
    68                     si(.//sm:link[@target='subWindow'], resultatAgent('//agentGenerator', 'fillBufferDynUiMgr')) 
    69                    )"/>                  
    70                 <xsl0:variable name="pathFillBuffer" select="concat('templatesCalled/', resultatDialogue('.../codeTemplate'), '/fillBuffers')"/> 
    71                 <!-- Parcours tous les transformer pour trouver ceux qui exploitent ce template --> 
    72                 <xsl0:for-each select="agentsLies(dialog('...//linksTransf'))"> 
    73                         <!-- Source:<xsl0:value-of select="pathAgent(.)"/> - agentFillBuffer : <xsl0:value-of select="pathAgent(agent($pathFillBuffer, .))"/> --> 
    74                         <xsl0:value-of select="resultatAgent(agent($pathFillBuffer, .))"/> 
    75                 </xsl0:for-each> 
    76                 <!-- Parcours tous les transformers et widgets directement appelés par le template --> 
    77                 <xsl0:for-each select="parseXml(resultatAgent('//calledStylableList'))/liste/item"> 
    78                         <xsl0:value-of select="resultatAgent(concat(., '/fillBuffers'))"/> 
    79                 </xsl0:for-each> 
    80                 <xsl0:value-of select="initBuffer('checkBlock')"/> 
    81                 <!-- Ajout des traitements dynamiques XSL au chargelent de la page dans les browsers 
    82                                 cf. http://www.w3.org/Math/XSL/ 
    83                  --> 
    84                 <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
    85                         <!-- copie des ressources --> 
    86                         <xsl0:variable name="vMmlXslPath" select="resultatAgent('//',  
    87                                                                                                                 concat( 
    88                                                                                                                         'res:src=bsco:sm/webSiteTemplate/mml',  
    89                                                                                                                         resultatAgent(srcPathFolder),  
    90                                                                                                                         ';mutabledst=', 
    91                                                                                                                         'ui.doss/site/lib/mml' 
    92                                                                                                                 ))"/> 
    93                         <!-- Déclaration des XSL : résolu coté wm --> 
    94                         <xsl0:text disable-output-escaping="yes"><![CDATA[<?xml-stylesheet type="text/xsl" href="$vGeneratorUtils.translatePubUri2DestUrl(']]></xsl0:text><xsl0:value-of select="$vMmlXslPath"/><xsl0:text disable-output-escaping="yes"><![CDATA[/pmathml.xsl')"?>]]></xsl0:text> 
    95                 </xsl0:if> 
    96                 <!-- Contenu --> 
    97                 <html> 
    98                         <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
    99                                 <xsl0:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl0:attribute> 
    100                         </xsl0:if> 
    101                         <xsl0:if test="resultatAgent('//standard/mmlNamespace') = 'yes'"> 
    102                         <xsl0:attribute name="xmlns:math">http://www.w3.org/1998/Math/MathML</xsl0:attribute> 
    103                         </xsl0:if> 
    104                         <xsl0:if test="resultatAgent('//standard/svgNamespace') = 'yes'"> 
    105                                 <xsl0:attribute name="xmlns:svg">http://www.w3.org/2000/svg</xsl0:attribute> 
    106                         </xsl0:if> 
    107                         <xsl0:if test="resultatAgent('//agentGenerator', 'debug') != 'no'"> 
    108                                 <xsl0:comment> 
    109                                         standard : <xsl0:value-of select="resultatAgent('//standard')"/> 
    110                                         dialog : $vDialog.hGetUrlInInstance() 
    111                                 </xsl0:comment> 
    112                         </xsl0:if><xsl0:text> 
    113 </xsl0:text> 
    114                         <head><xsl0:text> 
    115 </xsl0:text> 
    116         <xsl0:variable name="vWinTitle"><xsl0:apply-templates select="sm:head/sm:windowTitle/*"  mode="titlebuilder"/></xsl0:variable> 
    117         <title><xsl0:value-of select="normalize-space($vWinTitle)"/></title><xsl0:text> 
    118 </xsl0:text> 
    119 <xsl0:if test="resultatAgent('//standard/xslMethod') = 'xml'"> 
    120         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><xsl0:text> 
    121 </xsl0:text> 
    122 </xsl0:if> 
    123  
    124 <xsl0:if test="@blockCache!='no'"> 
    125         <!-- Elimination des caches clients --> 
    126         <meta content="no-cache" http-equiv="Cache-Control"/><xsl0:text> 
    127 </xsl0:text> 
    128         <meta content="no-cache" http-equiv="Pragma"/><xsl0:text> 
    129 </xsl0:text> 
    130         <meta content="Fri, 01 Jan 1990 00:00:00 GMT" name="Expires" http-equiv="expires"/><xsl0:text> 
    131 </xsl0:text> 
    132  <meta content="text/css" http-equiv="Content-Style-Type"/> 
    133 </xsl0:if> 
    134 <xsl0:apply-templates select="sm:head/sm:meta" mode="metaTags"/><xsl0:text> 
    135  
    136 </xsl0:text>#set $destUrlTemplateResInSite = "<xsl0:value-of select="resultatAgent('templateResources')"/>"<xsl0:if test="count(sm:resources/@favicon)!=0"><xsl0:text> 
    137 </xsl0:text><link type="image/x-icon" rel="shortcut icon" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlTemplateResInSite)/{sm:resources/@favicon}"/> 
    138 </xsl0:if><xsl0:text> 
    139 </xsl0:text>(!(inc=css.withTag)!)<!-- Inclusions CSS issues des transformers --> 
    140 (!(inc=css.link)!) 
    141 <xsl0:variable name="vDestUrlStyle" select="resultatDialogue('.../destUrlStyle')"/><xsl0:if test="$vDestUrlStyle">#set $destUrlStyle = "<xsl0:value-of select="$vDestUrlStyle"/>" 
    142 <link type="text/css" rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlStyle)"/><xsl0:text> 
    143 </xsl0:text> 
    144 </xsl0:if> 
    145 <xsl0:value-of select="resultatDialogue('.../initUiServices')" disable-output-escaping="yes"/><xsl0:text> 
    146 (!(inc=js.withTag)!) 
    147 (!(inc=js.link)!) 
    148 </xsl0:text><xsl0:apply-templates select="sm:head/*"/> 
    149 </head><xsl0:text> 
    150 </xsl0:text> 
    151 <body><xsl0:text> 
    152 </xsl0:text> 
    153         <xsl0:apply-templates select="sm:body"/><xsl0:text> 
    154 </xsl0:text> 
    155 </body><xsl0:text> 
    156 </xsl0:text> 
    157 </html> 
     116                                                <xsl0:if test="sm:resources/@favicon"> 
     117                                                        <link type="image/x-icon" rel="shortcut icon" href="{{translatePubPath2DestUrl(&quot;{$vDestUrlTemplateResInSite}/{sm:resources/@favicon}&quot;)}}"/> 
     118                                                </xsl0:if> 
     119                                                (!(inc=css.withTag)!)<!-- Inclusions CSS issues des transformers --> 
     120                                                (!(inc=css.link)!) 
     121                                                <xsl0:value-of select="resultatDialogue('.../initUiServices')" disable-output-escaping="yes"/><!-- Initialisation du scContext et des services --> 
     122                                                (!(inc=js.withTag)!)<!-- Inclusions JS issues des transformers --> 
     123                                                (!(inc=js.link)!)        
     124                                                <xsl0:apply-templates select="sm:styles/*"/> 
     125                                                <xsl0:apply-templates select="sm:head/*"/> 
     126                                        </head> 
     127                                        <body> 
     128                                                <xsl0:apply-templates select="sm:body"/> 
     129                                        </body> 
     130                                </html> 
     131                        </xsl:template> 
     132                </xsl:stylesheet> 
    158133        </xsl0:template> 
    159134 
     
    161136        <xsl0:template match="sm:meta"/>         
    162137        <xsl0:template match="sm:windowTitle"/>  
    163  
    164         <xsl0:template match="sm:callMainZone">(!(inc=zone.mainZone.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>)!)</xsl0:template> 
    165         <xsl0:template match="sm:callZone">(!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>)!)</xsl0:template> 
    166         <xsl0:template match="sm:callRootModel"> 
    167                 <xsl0:choose> 
    168                         <xsl0:when test="not(@format!='xhtml')">(!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'xhtml')"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null, '<zoneContent>', '</zoneContent>'))!)</xsl0:when> 
    169                         <xsl0:otherwise>(!(inc=evalWm.<xsl0:value-of select="@format"/>.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null))!)</xsl0:otherwise> 
    170                 </xsl0:choose>           
    171         </xsl0:template>         
    172                  
    173         <!-- sm:Widget ===================================================================== --> 
    174         <xsl0:template match="sm:Widget"> 
    175                 <xsl0:choose> 
    176                         <xsl0:when test="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/contentFormat'))='xhtml'">(!(inc=evalWm.xhtml.<xsl0:value-of select="resultatAgent('//standard/xslMethod')"/>.$vGeneratorUtils.resultatAgent("/@@/tplWidget_<xsl0:value-of select="getIdFromPath(@sc:refUri)"/>", null, "<zoneContent>", "</zoneContent>"))!)</xsl0:when> 
    177                         <xsl0:otherwise>$vGeneratorUtils.resultatAgent("/@@/tplWidget_<xsl0:value-of select="getIdFromPath(@sc:refUri)"/>", null)</xsl0:otherwise> 
    178                 </xsl0:choose> 
    179         </xsl0:template>         
    180  
    181         <!-- sm:WLink ===================================================================== --> 
    182         <xsl0:template match="sm:WLink"> 
    183                 <xsl0:variable name="vOptions"> 
    184                         <xsl0:call-template name="linkOptions"/><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    185                 </xsl0:variable> 
    186                 <a> 
    187                         <xsl0:call-template name="linkHref"><!-- Dans bsco:sm/web/sm_WLink.xml.xsl --> 
    188                                 <xsl0:with-param name="pUrl"><xsl0:apply-templates mode="wlinkUrl" select="sm:link/*"/></xsl0:with-param> 
    189                                 <xsl0:with-param name="pOptions"><xsl0:value-of select="$vOptions"/></xsl0:with-param> 
    190                         </xsl0:call-template> 
    191                         <xsl0:call-template name="classAtt"/> 
    192                         <xsl0:call-template name="idAtt"/> 
    193                         <xsl0:if test="count(sm:labelTitle) != 0"> 
    194                                 <xsl0:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/node()"/></xsl0:attribute> 
    195                         </xsl0:if> 
    196                         <xsl0:choose> 
    197                                 <xsl0:when test="not(sm:label/* | sm:label/text())">&#160;</xsl0:when> 
    198                                 <xsl0:otherwise><span><xsl0:apply-templates select="sm:label/node()"/></span></xsl0:otherwise> 
    199                         </xsl0:choose></a> 
    200         </xsl0:template> 
    201         <xsl0:template match="sm:fixedURL" mode="wlinkUrl"><xsl0:value-of select="@url"/></xsl0:template> 
    202         <xsl0:template match="*|text()|@*" mode="wlinkUrl"/> 
    203  
    204         <!-- sm:WButton ===================================================================== --> 
    205         <xsl0:template match="sm:WButton"> 
    206                 <a href="javascript:void(0);"> 
    207                         <xsl0:attribute name="onclick"> 
    208                                 <xsl0:choose> 
    209                                         <xsl0:when test="sm:action/sm:close">window.top.close();</xsl0:when> 
    210                                         <xsl0:when test="sm:action/sm:print">window.print();</xsl0:when> 
    211                                         <xsl0:when test="sm:action/sm:jsFragment"><xsl0:value-of select="sm:action/sm:jsFragment/@command"/></xsl0:when> 
    212                                 </xsl0:choose> 
    213                         </xsl0:attribute> 
    214                         <xsl0:call-template name="classAtt"/> 
    215                         <xsl0:call-template name="idAtt"/> 
    216                         <xsl0:if test="count(sm:labelTitle) != 0"> 
    217                                 <xsl0:attribute name="title"><xsl0:apply-templates select="sm:labelTitle/node()"/></xsl0:attribute> 
    218                         </xsl0:if> 
    219                         <xsl0:choose> 
    220                                 <xsl0:when test="not(sm:label/* | sm:label/text())">&#160;</xsl0:when> 
    221                                 <xsl0:otherwise><span><xsl0:apply-templates select="sm:label/node()"/></span></xsl0:otherwise> 
    222                         </xsl0:choose></a> 
    223         </xsl0:template> 
    224  
    225         <!-- sm:WObject ===================================================================== --> 
    226         <xsl0:template match="sm:WObject"> 
    227 #set $pubUriObject = "<xsl0:value-of select="resultatAgent('//', 
    228                                                                                                                         concat( 
    229                                                                                                                                 'res:src=wsp:',  
    230                                                                                                                                 @sc:refUri,  
    231                                                                                                                                 ';mutabledst=', 
    232                                                                                                                                 resultatDialogue('.../destPathTemplateResInSite'), 
    233                                                                                                                                 '/', 
    234                                                                                                                                 java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
    235                                                                                                                         ))"/>" 
    236                 <object codebase="{sm:codebase/@value}" classid="{sm:classid/@value}" height="{sm:height/sm:fixedValue/@value}" width="{sm:width/sm:fixedValue/@value}"> 
    237                         <xsl0:call-template name="classAtt"/> 
    238                         <xsl0:call-template name="idAtt"/> 
    239                         <param name="src" value="$vGeneratorUtils.translatePubUri2DestUrl($pubUriObject)"/> 
    240                         <xsl0:apply-templates select="sm:param" mode="objParams"/> 
    241                         <embed pluginspage="{sm:pluginspage/@value}" height="{sm:height/sm:fixedValue/@value}" width="{sm:width/sm:fixedValue/@value}" type="{sm:type/@value}" src="$vGeneratorUtils.translatePubUri2DestUrl($pubUriObject)"> 
    242                                 <xsl0:call-template name="classAtt"/> 
    243                                 <xsl0:if test="@id"> 
    244                                         <xsl0:attribute name="name"><xsl0:value-of select="@id"/></xsl0:attribute> 
    245                                 </xsl0:if> 
    246                                 <xsl0:apply-templates select="sm:param" mode="objParamsEmbedAtts"/> 
    247                         </embed> 
    248                         <xsl0:if test="count(sm:altContent)!=0"> 
    249                                 <noembed> 
    250                                         <xsl0:apply-templates select="sm:altContent/*"/> 
    251                                 </noembed>       
    252                         </xsl0:if> 
    253                 </object> 
    254         </xsl0:template> 
    255         <xsl0:template match="sm:param" mode="objParams"> 
    256                 <param name="{@name}"> 
    257                         <xsl0:attribute name="value"><xsl0:apply-templates mode="xhtmlUrl"/></xsl0:attribute> 
    258                 </param>  
    259         </xsl0:template> 
    260         <xsl0:template match="sm:param" mode="objParamsEmbedAtts"> 
    261                 <xsl0:attribute name="{@name}"><xsl0:apply-templates mode="xhtmlUrl"/></xsl0:attribute> 
    262         </xsl0:template> 
    263         <xsl0:template match="sm:fixedValue" mode="xhtmlUrl"><xsl0:value-of select="@value"/></xsl0:template> 
    264         <xsl0:template match="sm:title"> 
    265                 <xsl0:apply-templates mode="titlebuilder"/> 
    266         </xsl0:template> 
    267          
    268         <!-- sm:WXhtmlFragment ===================================================================== --> 
    269         <xsl0:template match="sm:WXhtmlFragment"> 
    270                 <xsl0:value-of select="." disable-output-escaping="yes"/><xsl0:if test="local-name(..) = 'head'"><xsl0:text> 
    271 </xsl0:text></xsl0:if> 
    272         </xsl0:template> 
    273138 
    274139        <!-- xhtml + text ===================================================================== --> 
     
    281146 
    282147        <xsl0:template match="xhtml:img"> 
    283 #set $pubUriImage = "<xsl0:value-of select="resultatAgent('//', 
    284                                                                                                                         concat( 
    285                                                                                                                                 'res:src=wsp:',  
    286                                                                                                                                 @sc:refUri,  
    287                                                                                                                                 ';mutabledst=', 
    288                                                                                                                                 resultatDialogue('.../destPathTemplateResInSite'), 
    289                                                                                                                                 '/', 
    290                                                                                                                                 java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
    291                                                                                                                         ))"/>" 
    292 <img src="$vGeneratorUtils.translatePubUri2DestUrl($pubUriImage)" alt="{@alt}"><xsl0:apply-templates select="@*" mode="freeAtts" /></img> 
     148                <img src="{{translatePubPath2DestUrl(&quot;{ 
     149                                resultatAgent('//', 
     150                                concat( 
     151                                        'res:src=wsp:',  
     152                                        @sc:refUri,  
     153                                        ';mutabledst=', 
     154                                        resultatDialogue('.../destPathTemplateResInSite'), 
     155                                        '/', 
     156                                        java:substring(string(@sc:refUri), java:lastIndexOf(string(@sc:refUri), '/')+1) 
     157                                )) 
     158                        }&quot;)}}" alt="{@alt}"> 
     159                        <xsl0:apply-templates select="@*" mode="freeAtts" /> 
     160                </img> 
    293161        </xsl0:template> 
    294162 
     
    297165        </xsl0:template> 
    298166        <xsl0:template match="@sc:*" mode="freeAtts" /> 
    299         <xsl0:template match="@class" mode="freeAtts"> 
    300                 <xsl0:copy /> 
    301         </xsl0:template> 
     167        <xsl0:template match="@sm:*" mode="freeAtts" /> 
    302168 
    303169        <xsl0:template match="text()"> 
     
    306172                </xsl0:if> 
    307173        </xsl0:template> 
    308  
    309         <!-- titlebuilder ===================================================================== --> 
    310         <xsl0:template match="sm:rootTitle" mode="titlebuilder"> 
    311                 <xsl0:choose> 
    312                         <xsl0:when test="@type='shortTitle'">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot("<xsl0:value-of select="getAxisSuffix(@axis)"/>/shortTitleText"), null))</xsl0:when> 
    313                         <xsl0:otherwise>$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot("<xsl0:value-of select="getAxisSuffix(@axis)"/>/fullTitleText"), null))</xsl0:otherwise> 
    314                 </xsl0:choose> 
    315         </xsl0:template> 
    316         <xsl0:template match="sm:pageTitle" mode="titlebuilder">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>($vGeneratorUtils.getTitleAgent($vAgent))</xsl0:template> 
    317         <xsl0:template match="sm:fixedString" mode="titlebuilder"><xsl0:value-of select="@value"/></xsl0:template> 
    318         <xsl0:template match="sm:callZone" mode="titlebuilder">(!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'text')"/>.text)!)</xsl0:template> 
    319         <xsl0:template match="sm:callRootModel" mode="titlebuilder">(!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'text')"/>.text.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null))!)</xsl0:template> 
    320         <xsl0:template match="*|text()|@*" mode="titlebuilder"/> 
    321          
    322         <!-- metaTags ===================================================================== --> 
    323         <xsl0:template match="sm:meta" mode="metaTags"><xsl0:text> 
    324 </xsl0:text><meta name="{@name}"><xsl0:attribute name="content"><xsl0:apply-templates mode="metaTags"/></xsl0:attribute></meta> 
    325         </xsl0:template> 
    326         <xsl0:template match="sm:fixedContent" mode="metaTags"><xsl0:value-of select="@value"/></xsl0:template> 
    327         <xsl0:template match="sm:callZone" mode="metaTags">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>((!(inc=zone.<xsl0:value-of select="@key"/>.<xsl0:value-of select="si(@format, @format, 'text')"/>.text)!))</xsl0:template> 
    328         <xsl0:template match="sm:callRootModel" mode="metaTags">$vGeneratorUtils.<xsl0:value-of select="si(resultatAgent('//standard/xslMethod') = 'xml', 'escapeXml', 'escapeHtml')"/>((!(inc=evalWm.<xsl0:value-of select="si(@format, @format, 'text')"/>.text.$vGeneratorUtils.resultatAgent($vGeneratorUtils.getPathAgentRoot('<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'), null))!))</xsl0:template> 
    329         <xsl0:template match="*|text()|@*" mode="metaTags"/> 
    330          
    331         <!-- scriptTags ===================================================================== --> 
    332         <xsl0:template match="sm:script"><script type="{@type}" src="$vGeneratorUtils.translatePubUri2DestUrl($destUrlTemplateResInSite)/{@src}"></script><xsl0:text> 
    333 </xsl0:text></xsl0:template> 
    334         <xsl0:template match="sm:script[@srcFrom='publishFiles']"> 
    335 #set $pubUriScript = "/<xsl0:value-of select="@src"/>" 
    336 <script type="{@type}" src="$vGeneratorUtils.translatePubUri2DestUrl($pubUriScript)"></script><xsl0:text> 
    337 </xsl0:text></xsl0:template> 
    338          
    339         <!-- styleSheetTags ===================================================================== --> 
    340         <xsl0:template match="sm:styleSheet"><link type="text/css" rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($destUrlTemplateResInSite)/{@src}"><xsl0:if test="@media"><xsl0:attribute name="media"><xsl0:value-of select="@media"/></xsl0:attribute></xsl0:if></link><xsl0:text> 
    341 </xsl0:text></xsl0:template> 
    342         <xsl0:template match="sm:styleSheet[@srcFrom='publishFiles']"> 
    343 #set $pubUriStyle = "/<xsl0:value-of select="@src"/>" 
    344 <link type="text/css" rel="stylesheet" href="$vGeneratorUtils.translatePubUri2DestUrl($pubUriStyle)"><xsl0:if test="@media"><xsl0:attribute name="media"><xsl0:value-of select="@media"/></xsl0:attribute></xsl0:if></link><xsl0:text> 
    345 </xsl0:text></xsl0:template> 
    346          
    347         <!-- Class & Id attibute helper templates ===================================================================== --> 
    348         <xsl0:template name="classAtt"> 
    349                 <xsl0:if test="@class"> 
    350                         <xsl0:attribute name="class"><xsl0:value-of select="@class"/></xsl0:attribute> 
    351                 </xsl0:if> 
    352         </xsl0:template> 
    353         <xsl0:template name="idAtt"> 
    354                 <xsl0:if test="@id"> 
    355                         <xsl0:attribute name="id"><xsl0:value-of select="@id"/></xsl0:attribute> 
    356                 </xsl0:if> 
    357         </xsl0:template> 
    358174                 
    359175</xsl0:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_transparentUiFrame.xml

    r10364 r10487  
    154154                                </zone> 
    155155                        </page> 
    156                 </affichage>             
     156                </affichage> 
     157 
     158 
    157159 
    158160                <affichage code="index"> 
    159                         <urlPage type="xpath-dynamique">si(resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html', 'ui.doss/site/index.html.wm', 'ui.doss/site/index.xhtml.wm')</urlPage> 
     161                        <urlPage type="xpath-dynamique">si(resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html', 'ui.doss/site/index.html.dyn.xsl', 'ui.doss/site/index.xhtml.dyn.xsl')</urlPage> 
    160162                        <page> 
    161                                 <modele>wmTemplate-xhtml</modele> 
    162                                 <zone cle="mainZone" type="contextuel-dynamique"> 
    163                                         <choose> 
    164                                                 <case xpath="resultatAgent('//isIframe')='true' and resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html'" type="inclusion-dynamique"> 
    165                                                         <source><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    166 <html> 
    167         <head> 
    168                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    169         [![agent=includeHead]!] 
    170         </head> 
    171         <body style="overflow: hidden; border:none; padding:0px; margin:0px;"><iframe id="mainFrame" name="mainFrame" src="lib/blank.html" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe></body>  
    172 </html>]]></source> 
    173                                                 </case> 
    174                                                 <case xpath="resultatAgent('//isFramset')='true' and resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html'" type="inclusion-dynamique"> 
    175                                                         <source><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    176 <html> 
    177         <head> 
    178                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    179         [![agent=includeHead]!] 
    180         </head> 
    181         <frameset><frame id="mainFrame" name="mainFrame" src="lib/blank.html" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0"></frame><noframes><body>Your browser does not handle frames, certain aspects of this site may not work properly.</body></noframes></frameset>    
    182 </html>]]></source> 
    183                                                 </case> 
    184                                                 <case xpath="resultatAgent('//isIframe')='true'" type="inclusion-dynamique"> 
    185                                                         <source><![CDATA[<?xml version="1.0" encoding="UTF-8"?> 
    186 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    187 <html xmlns="http://www.w3.org/1999/xhtml"> 
    188         <head> 
    189                 <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"/> 
    190         [![agent=includeHead]!] 
    191         </head> 
    192         <body style="overflow: hidden; border:none; padding:0px; margin:0px;"><iframe id="mainFrame" name="mainFrame" src="lib/blank.xhtml" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe></body>         
    193 </html>]]></source> 
    194                                                 </case> 
    195                                                 <case xpath="resultatAgent('//isFramset')='true'" type="inclusion-dynamique"> 
    196                                                         <source><![CDATA[<?xml version="1.0" encoding="UTF-8"?> 
    197 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    198 <html xmlns="http://www.w3.org/1999/xhtml"> 
    199         <head> 
    200                 <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"/> 
    201         [![agent=includeHead]!] 
    202         </head> 
    203         <frameset><frame id="mainFrame" name="mainFrame" src="lib/blank.xhtml" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0"></frame></frameset>     
    204 </html>]]></source> 
    205                                                 </case> 
    206                                                 <case xpath="resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html'"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    207 <html> 
    208         <head> 
    209                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    210                 <meta http-equiv="Refresh" content="0;URL=$vDialog.hGetResultat('/@@', 'act:')"> 
    211                 <title></title> 
    212         </head> 
    213         <body></body> 
    214 </html>]]></case> 
    215                                                 <default><![CDATA[<?xml version="1.0" encoding="UTF-8"?> 
    216 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    217 <html xmlns="http://www.w3.org/1999/xhtml"> 
    218         <head> 
    219                 <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"/> 
    220                 <meta http-equiv="Refresh" content="0;URL=$vDialog.hGetResultat('/@@', 'act:')"/> 
    221                 <title></title> 
    222         </head> 
    223         <body></body> 
    224 </html>]]></default> 
    225                                         </choose> 
     163                                <modele>xslTemplate-xhtml</modele> 
     164                                <zone cle="mainZone" type="xslOnSrc-dynamique"> 
     165<xsl0:stylesheet  
     166                xmlns:xsl0="http://www.w3.org/1999/XSL/Transform" 
     167                xmlns:sm="http://www.utc.fr/ics/scenari/v3/modeling"  
     168                xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"  
     169                xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias"  
     170                xmlns:java="http://xml.apache.org/xslt/java"  
     171                xmlns:xhtml="http://www.w3.org/1999/xhtml" 
     172                exclude-result-prefixes="sm sc xsl xhtml" 
     173                version="1.0"> 
     174 
     175        <xsl0:import href="bsco:sm/webSiteTemplate/template.xsl.xsl"/> 
     176 
     177        <xsl0:output method="xml" indent="no" encoding="UTF-8"/> 
     178        <xsl0:namespace-alias stylesheet-prefix="xsl" result-prefix="xsl0"/> 
     179         
     180        <xsl0:param name="vDialog"/> 
     181        <xsl0:param name="vAgent"/> 
     182         
     183        <xsl0:variable name="xslMethod" select="resultatAgent('//agentGenerator', 'standard/xslMethod')"/> 
     184         
     185        <xsl0:template match="*"> 
     186                <xsl:stylesheet version="1.0" exclude-result-prefixes="java"> 
     187                         
     188                        <xsl:output method="{$xslMethod}" indent="no" encoding="UTF-8" > 
     189                                <xsl0:if test="$xslMethod='html'"> 
     190                                        <xsl0:attribute name="doctype-public">-//W3C//DTD HTML 4.01 Transitional//EN</xsl0:attribute> 
     191                                        <xsl0:attribute name="doctype-system">http://www.w3.org/TR/html4/loose.dtd</xsl0:attribute> 
     192                                </xsl0:if> 
     193                        </xsl:output> 
     194                        <xsl:param name="vDialog"/> 
     195                        <xsl:param name="vAgent"/> 
     196                        <xsl:template match="*"> 
     197                                <html> 
     198                                        <xsl0:if test="$xslMethod='xml'"> 
     199                                                <xsl0:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl0:attribute> 
     200                                        </xsl0:if> 
     201                                        <head> 
     202                                                <meta http-equiv="Content-Type" content="text/{si(xslMethod='html', 'html', 'xhtml')}; charset=utf-8"/> 
     203                                                <xsl0:choose> 
     204                                                        <xsl0:when test="resultatAgent('//isFrame')='true'"> 
     205                                                                <xsl0:variable name="loadStartPage">scOnLoads[scOnLoads.length] = { onLoad: function(){ $("mainFrame").src = scUrlToLoad;}, loadSortKey: "ZZloadRootPage"}</xsl0:variable> 
     206                                                                <xsl0:value-of select="execute( 
     207                                                                                resultatAgent('//agentGenerator', 'fillBufferCoLib'), 
     208                                                                                setEntryBuffer('js.postLink', 'loadStartPage', $loadStartPage) 
     209                                                                   )"/> 
     210                                                                <title><xsl:value-of select="resultatAgent('@@/contentRoot', 'fullTitleText')"/></title> 
     211                                                                <xsl0:if test="sm:styleResources/@favicon"> 
     212                                                                        <link type="image/x-icon" rel="shortcut icon" href="{{translatePubPath2DestUrl(&quot;{sm:styleResources/@favicon}&quot;)}}"/> 
     213                                                                </xsl0:if>                                                               
     214                                                                <script type="text/JavaScript"> 
     215                                                                        var scServices = {}; 
     216                                                                        <!-- Service générique de chargement de pages --> 
     217                                                                        scServices["scLoad"] = { 
     218                                                                                loadFromRoot : function(pUrl) {$("mainFrame").src = pUrl;}, 
     219                                                                                getUrlFromRoot:function(pHref){if(!this.fRootOffset) this.fRootOffset = window.location.href.lastIndexOf("/")+1; return pHref.substring(this.fRootOffset);} 
     220                                                                        } 
     221                                                                        <!-- scUrlToLoad : API pour permettre de modifier la page à charger par un service de type locationStorage. --> 
     222                                                                        var scUrlToLoad = "<xsl:value-of select="resultatAgent('/@@', 'act:')"/>"; 
     223                                                                </script> 
     224                                                                <xsl0:for-each select="parseXml(resultatAgent('//uiServiceList'))/liste/item"> 
     225                                                                        <xsl0:value-of select="resultatAgent(concat(., '/declareInPage'))"/> 
     226                                                                </xsl0:for-each> 
     227        (!(inc=js.withTag)!) 
     228        (!(inc=js.link)!) 
     229                                                        </xsl0:when> 
     230                                                        <xsl0:otherwise> 
     231                                                                <meta http-equiv="Refresh" content="0;URL={{resultatAgent('/@@', 'act:')}}"/> 
     232                                                                <title/> 
     233                                                        </xsl0:otherwise> 
     234                                                </xsl0:choose> 
     235                                        </head> 
     236                                        <xsl0:choose> 
     237                                                <xsl0:when test="resultatAgent('//isFramset')='true'"> 
     238                                                        <frameset><frame id="mainFrame" name="mainFrame" src="lib/blank.html" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0"></frame><noframes><body>Your browser does not handle frames, certain aspects of this site may not work properly.</body></noframes></frameset>    
     239                                                </xsl0:when> 
     240                                                <xsl0:when test="resultatAgent('//isIframe')='true'"> 
     241                                                        <body style="overflow: hidden; border:none; padding:0px; margin:0px;"><iframe id="mainFrame" name="mainFrame" src="lib/blank.xhtml" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe></body>         
     242                                                </xsl0:when> 
     243                                                <xsl0:otherwise> 
     244                                                        <body/> 
     245                                                </xsl0:otherwise> 
     246                                        </xsl0:choose> 
     247                                </html> 
     248                        </xsl:template> 
     249                </xsl:stylesheet> 
     250        </xsl0:template> 
     251</xsl0:stylesheet> 
    226252                                </zone> 
    227253                        </page> 
    228                         <valeur code="includeHead"> 
    229                                 <source type="composition-dynamique">                                    
    230                                         <c:composition xmlns:c="composition"> 
    231 <c:donnee type="xpath-dynamique">execute(resultatAgent('//agentGenerator', 'fillBufferCoLib'))</c:donnee> 
    232         <title>$vGeneratorUtils.escapeHtml($vGeneratorUtils.resultatAgent('@@/contentRoot', 'fullTitleText'))</title> 
    233 <c:if test="sm:styleResources/@favicon != ''" type="xpath-statique">#set $vUrlIcon = "<c:donnee type="xpath-statique">sm:styleResources/@favicon</c:donnee>" 
    234         <link rel="shortcut icon" test="$vUrlIcon" href="$vGeneratorUtils.translatePubUri2DestUrl($vUrlIcon)" type="image/x-icon"/> 
    235 </c:if> 
    236         <script type="text/JavaScript"> 
    237                 var scServices = {}; 
    238                 <!-- Service générique de chargement de pages --> 
    239                 scServices["scLoad"] = { 
    240                         loadFromRoot : function(pUrl) {$("mainFrame").src = pUrl;}, 
    241                         getUrlFromRoot:function(pHref){if(!this.fRootOffset) this.fRootOffset = window.location.href.lastIndexOf("/")+1; return pHref.substring(this.fRootOffset);} 
    242                 } 
    243                 <!-- scUrlToLoad : API pour permettre de modifier la page à charger par un service de type locationStorage. --> 
    244                 var scUrlToLoad = "$vDialog.hGetResultat('/@@', 'act:')"; 
    245         </script> 
    246         <c:donnee type="xpath-dynamique">execute(setEntryBuffer('js.postLink', 'loadStartPage', 'scOnLoads[scOnLoads.length] = { onLoad: function(){ $("mainFrame").src = scUrlToLoad;}, loadSortKey: "ZZloadRootPage"}'))</c:donnee> 
    247         <c:boucleagents> 
    248                 <c:listeagents type="resultat-dynamique">agent=//uiServiceList</c:listeagents> 
    249                 <c:resultat agent="declareInPage"/>  
    250         </c:boucleagents> 
    251         (!(inc=js.withTag)!) 
    252         (!(inc=js.link)!) 
    253                         </c:composition></source> 
    254                         </valeur> 
    255254                </affichage> 
     255                 
    256256        </groupAffichage> 
    257257         
     
    271271                                                <c:donnee type="xpath-dynamique">setEntryBuffer('js', 'initScServices', '/*0*/ var scServices = window.opener ? window.opener.scServices : window.parent.scServices;')</c:donnee> 
    272272                                                <c:if type="xpath-statique" test="boolean(sm:rootContext/sm:*/sm:ifContextNotFound/sm:goToHome)"> 
    273                                                         <c:donnee type="xpath-dynamique">setEntryBuffer('js', 'notFoundScServices', concat('/*1*/ if(!scServices) window.location.href="$vGeneratorUtils.resolveDestUri2DestUrl("', si(resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html', '/index.html', '/index.xhtml'), '")";'))</c:donnee> 
     273                                                        <c:donnee type="xpath-dynamique"><![CDATA[setEntryBuffer('js', 'notFoundScServices', concat('xslFragment:/*1*/ if(!scServices) window.location.href="<xsl:value-of select="resolveDestUri2DestUrl(', si(resultatAgent('//agentGenerator', 'standard/xslMethod') = 'html', '/index.html', '/index.xhtml'), ')"/>";'))]]></c:donnee> 
    274274                                                </c:if> 
    275275                                                <c:boucleagents> 
     
    281281                                <default type="composition-dynamique">                                   
    282282                                        <c:composition xmlns:c="composition"> 
    283                                                 <c:donnee type="xpath-dynamique">execute( 
     283                                                <c:donnee type="xpath-dynamique"><![CDATA[execute( 
    284284                                                        setEntryBuffer('js', 'initScServices', '/*0*/ var scServices = {};'), 
    285                                                         setEntryBuffer('js', 'initScLoadSvc', '/*1*/ scServices["scLoad"] = {loadFromRoot:function(pUrl){window.location.href="$vGeneratorUtils.resolveDestUri2DestUrl("/")"+pUrl;}, getUrlFromRoot:function(pHref){if(!this.fRootOffset) this.fRootOffset = window.location.href.length + 1 - $vDialog.hGetPageResultat().getDestUrl().length(); return pHref.substring(this.fRootOffset);}};') 
    286                                                 )</c:donnee> 
     285                                                        setEntryBuffer('js', 'initScLoadSvc', 'xslFragment:/*1*/ scServices["scLoad"] = {loadFromRoot:function(pUrl){window.location.href="<xsl:value-of select="resolveDestUri2DestUrl(&quot;/&quot;)"/>)"+pUrl;}, getUrlFromRoot:function(pHref){if(!this.fRootOffset) this.fRootOffset = window.location.href.length <xsl:value-of select="1 - java:length(java:getDestUrl(java:hGetPageResultat($vDialog)))"/>; return pHref.substring(this.fRootOffset);}};') 
     286                                                )]]></c:donnee> 
    287287                                                <c:boucleagents> 
    288288                                                        <c:listeagents type="resultat-dynamique">agent=//uiServiceList</c:listeagents> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_webSiteGenerator.xml

    r10307 r10487  
    182182                <source type="xpathOnSrc-dynamique">concat( 
    183183                        execute(initBuffer('checkWidget', java:java.util.HashSet.new())), 
    184                         concatExpr(sm:uiTemplateList/sm:uiTemplate, resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/bsRootFragment'))), 
     184                        concatExpr(sm:uiTemplateList/sm:uiTemplate, resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/bsRootFragment'), @code)), 
    185185                        execute(initBuffer('checkWidget')) 
    186186                        )</source> 
     
    251251                                <source type="xpath-dynamique">concat('/site/tplRes/', resultatAgent('../firstCodeSameTemplate'))</source> 
    252252