Ignore:
Timestamp:
07/02/07 11:52:22 (5 years ago)
Author:
sam
Message:

Ajout sm:subData en mode nav pour traverser un dataform en nav et appeler un subdataform.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_dataFormXhtmlTransf/calledTransformersInc.xsl

    r7521 r9302  
    5555         
    5656        <xsl:template match="sm:callSubModel" mode="in"> 
     57                <xsl:variable name="vView"> 
     58                        <xsl:choose> 
     59                                <xsl:when test="local-name(../..)!='link' and ( count(ancestor::sm:content) &gt; 0)">xhtmlContent</xsl:when> 
     60                                <xsl:otherwise>navigation</xsl:otherwise> 
     61                        </xsl:choose> 
     62                </xsl:variable> 
    5763                <xsl:variable name="vAxis" select="@axis"/> 
    58                 <xsl:variable name="vFor" select="ancestor::sm:forSubData"/> 
    59                 <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
    60                         <xsl:variable name="vDefModel" select="$vStructureModel//sm:subData[@code=current()]"/> 
    61                         <xsl:if test="count($vDefModel) &gt; 0"> 
    62                                 <xsl:for-each select="$vDefModel/sm:allowedDataModel"> 
    63                                         <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="xhtmlContent"/> 
     64                <xsl:choose> 
     65                        <xsl:when test="ancestor::sm:forSubData"> 
     66                                <xsl:variable name="vFor" select="ancestor::sm:forSubData"/> 
     67                                <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
     68                                        <xsl:variable name="vDefModel" select="$vStructureModel//sm:subData[@code=current()]"/> 
     69                                        <xsl:if test="count($vDefModel) &gt; 0"> 
     70                                                <xsl:for-each select="$vDefModel/sm:allowedDataModel"> 
     71                                                        <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     72                                                </xsl:for-each> 
     73                                        </xsl:if> 
    6474                                </xsl:for-each> 
    65                         </xsl:if> 
    66                 </xsl:for-each> 
     75                        </xsl:when> 
     76                        <xsl:otherwise> 
     77                                <xsl:variable name="vDefModel" select="$vStructureModel//sm:subData[@code=current()/../@field]"/> 
     78                                        <xsl:if test="count($vDefModel) &gt; 0"> 
     79                                                <xsl:for-each select="$vDefModel/sm:allowedDataModel"> 
     80                                                        <call model="{getIdFromPath(@sc:refUri)}" axis="{$vAxis}" view="{$vView}"/> 
     81                                                </xsl:for-each> 
     82                                        </xsl:if> 
     83                        </xsl:otherwise> 
     84                </xsl:choose> 
    6785        </xsl:template> 
    6886         
     
    7795                <xsl:variable name="vAxis" select="@axis"/> 
    7896                <xsl:choose> 
    79                         <xsl:when test="count(ancestor::sm:content) &gt; 0"> 
     97                        <xsl:when test="ancestor::sm:forField"> 
    8098                                <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
    8199                                <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
     
    105123                <xsl:variable name="vAxis" select="@axis"/> 
    106124                <xsl:choose> 
    107                         <xsl:when test="count(ancestor::sm:content) &gt; 0"> 
     125                        <xsl:when test="ancestor::sm:forField"> 
    108126                                <xsl:variable name="vFor" select="ancestor::sm:forField"/> 
    109127                                <xsl:for-each select="xalan:tokenize($vFor/@codes, ' ')"> 
Note: See TracChangeset for help on using the changeset viewer.