Ignore:
Timestamp:
06/20/07 12:55:14 (5 years ago)
Author:
sys
Message:

compositionXhtmlTransf : Ajout dans sm:link/callModel la présevation du contexte de nav : @navCtx="preserveCurrent"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_compositionXhtmlTransf/bs.xml.xsl

    r9279 r9281  
    655655        <xsl0:template match="sm:root" mode="callModel"> 
    656656                <xsl0:choose> 
    657                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     657                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    658658                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    659                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>'), 'act:')</source> 
    660                         </xsl0:when> 
    661                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     659                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>'), 'act:')</source> 
     660                        </xsl0:when> 
     661                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    662662                                <!-- On demande le contenu de cet agent. --> 
    663663                                <source type="xpath-dynamique">resultatAgent(concat('@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>/xhtmlContent'))</source> 
     
    671671        <xsl0:template match="sm:current" mode="callModel"> 
    672672                <xsl0:choose> 
    673                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     673                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    674674                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    675                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
    676                         </xsl0:when> 
    677                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     675                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
     676                        </xsl0:when> 
     677                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    678678                                <!-- On demande le contenu de cet agent. --> 
    679679                                <source type="xpath-dynamique">resultatAgent(concat('@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>'), '/xhtmlContent'))</source> 
     
    687687        <xsl0:template match="sm:lookForAscendants" mode="callModel"> 
    688688                <xsl0:choose> 
    689                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     689                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    690690                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    691                                 <source type="xpath-dynamique">resultatDialogue(concat('/@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
    692                         </xsl0:when> 
    693                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     691                                <source type="xpath-dynamique">resultatDialogue(concat('<xsl0:value-of select="si(@navCtx='preserveCurrent', '@', '/@')"/>', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>')), 'act:')</source> 
     692                        </xsl0:when> 
     693                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    694694                                <!-- On demande le contenu de cet agent. --> 
    695695                                <source type="xpath-dynamique">resultatAgent(concat('@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>'), '/xhtmlContent'))</source> 
     
    704704        <xsl0:template match="sm:agentPath" mode="callModel"> 
    705705                <xsl0:choose> 
    706                         <xsl0:when test="count(parent::sm:callModel/parent::sm:link) != 0"> 
     706                        <xsl0:when test="parent::sm:callModel/parent::sm:link"> 
    707707                                <!-- On demande la page liée et on retourne l'url de cette page. --> 
    708708                                <source type="xpath-dynamique">resultatDialogue('<xsl0:value-of select="@path"/>', 'act:')</source> 
    709709                        </xsl0:when> 
    710                         <xsl0:when test="count(/sm:compositionXhtmlTransf/sm:content)!= 0 or count(ancestor::sm:mainZone)!= 0 or count(ancestor::sm:zone) != 0"> 
     710                        <xsl0:when test="/sm:compositionXhtmlTransf/sm:content or ancestor::sm:mainZone or ancestor::sm:zone"> 
    711711                                <!-- On demande le contenu de cet agent (résolu par rapport au dialog en cours). --> 
    712712                                <source type="xpath-dynamique">resultatAgent(agent('<xsl0:value-of select="@path"/>', $vDialog))</source> 
Note: See TracChangeset for help on using the changeset viewer.