Changeset 7522


Ignore:
Timestamp:
11/27/06 19:57:04 (5 years ago)
Author:
sam
Message:

Ticket #78 - dataFormXhtmlTransf: écran de contrôle ne marche pas en mode navigation

Location:
branches/3.2.x/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2.x/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf.xml

    r6475 r7522  
    246246                                         
    247247                                <xsl:template match="sm:dataFormXhtmlTransf"> 
     248                                        <xsl:apply-templates mode="mainView"/> 
    248249                                        <view code="title"/> 
    249                                         <view code="xhtmlContent"><xsl:apply-templates mode="in"/></view> 
    250250                                </xsl:template> 
     251 
     252                                <xsl:template match="sm:content" mode="mainView"> 
     253                                        <view code="xhtmlContent"> 
     254                                                <xsl:apply-templates mode="in"/> 
     255                                        </view> 
     256                                </xsl:template> 
     257                                <xsl:template match="sm:navigation" mode="mainView"> 
     258                                        <view code="navigation"> 
     259                                                <xsl:apply-templates mode="in"/> 
     260                                        </view> 
     261                                </xsl:template> 
     262 
    251263                                         
    252264                        </xsl:stylesheet> 
  • branches/3.2.x/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/calledTransformersInc.xsl

    r5459 r7522  
    6868         
    6969        <xsl:template match="sm:fieldValueOtherType" mode="in"> 
    70                 <xsl:variable name="vView" select="si(local-name(..)!='link', 'xhtmlContent', 'navigation')"/> 
     70                <xsl:variable name="vView"> 
     71                        <xsl:choose> 
     72                                <xsl:when test="local-name(..)!='link' and ( count(ancestor::sm:content) &gt; 0)">xhtmlContent</xsl:when> 
     73                                <xsl:otherwise>navigation</xsl:otherwise> 
     74                        </xsl:choose> 
     75                </xsl:variable> 
     76                <!-- <xsl:variable name="vView" select="si(local-name(..)!='link', 'xhtmlContent', 'navigation')"/> --> 
    7177                <xsl:variable name="vAxis" select="@axis"/> 
    72                 <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
    73                 <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
    74                         <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=current()]/sm:otherType"/> 
    75                         <xsl:if test="count($vDefModel) &gt; 0"> 
    76                                 <call model="{getIdFromPath($vDefModel/@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
    77                         </xsl:if> 
    78                 </xsl:for-each> 
     78                <xsl:choose> 
     79                        <xsl:when test="count(ancestor::sm:content) &gt; 0"> 
     80                                <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
     81                                <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
     82                                        <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=current()]/sm:otherType"/> 
     83                                        <xsl:if test="count($vDefModel) &gt; 0"> 
     84                                                <call model="{getIdFromPath($vDefModel/@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     85                                        </xsl:if> 
     86                                </xsl:for-each> 
     87                        </xsl:when> 
     88                        <xsl:otherwise> 
     89                                <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=@field]/sm:otherType"/> 
     90                                <xsl:if test="count($vDefModel) &gt; 0"> 
     91                                        <call model="{getIdFromPath($vDefModel/@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     92                                </xsl:if> 
     93                        </xsl:otherwise> 
     94                </xsl:choose> 
    7995        </xsl:template> 
    8096         
    8197        <xsl:template match="sm:callRefModel" mode="in"> 
    82                 <xsl:variable name="vView" select="si(local-name(../..)!='link', 'xhtmlContent', 'navigation')"/> 
     98                <xsl:variable name="vView"> 
     99                        <xsl:choose> 
     100                                <xsl:when test="local-name(../..)!='link' and ( count(ancestor::sm:content) &gt; 0)">xhtmlContent</xsl:when> 
     101                                <xsl:otherwise>navigation</xsl:otherwise> 
     102                        </xsl:choose> 
     103                </xsl:variable> 
     104                <!-- <xsl:variable name="vView" select="si(local-name(../..)!='link', 'xhtmlContent', 'navigation')"/> --> 
    83105                <xsl:variable name="vAxis" select="@axis"/> 
    84                 <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
    85                 <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
    86                         <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=current()]/sm:refItem"/> 
    87                         <xsl:if test="count($vDefModel) &gt; 0"> 
    88                                 <xsl:for-each select="$vDefModel/sm:allowedModel"> 
    89                                         <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     106                <xsl:choose> 
     107                        <xsl:when test="count(ancestor::sm:content) &gt; 0"> 
     108                                <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
     109                                <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
     110                                        <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=current()]/sm:refItem"/> 
     111                                        <xsl:if test="count($vDefModel) &gt; 0"> 
     112                                                <xsl:for-each select="$vDefModel/sm:allowedModel"> 
     113                                                        <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     114                                                </xsl:for-each> 
     115                                        </xsl:if> 
    90116                                </xsl:for-each> 
    91                         </xsl:if> 
    92                 </xsl:for-each> 
     117                        </xsl:when> 
     118                        <xsl:otherwise> 
     119                                <xsl:variable name="vDefModel" select="$vStructureModel//sm:field[@code=current()/../@field]/sm:refItem"/> 
     120                                <xsl:if test="count($vDefModel) &gt; 0"> 
     121                                        <xsl:for-each select="$vDefModel/sm:allowedModel"> 
     122                                                <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     123                                        </xsl:for-each> 
     124                                </xsl:if> 
     125                        </xsl:otherwise> 
     126                </xsl:choose> 
    93127        </xsl:template>  
    94128         
Note: See TracChangeset for help on using the changeset viewer.