Changeset 8868


Ignore:
Timestamp:
03/05/07 17:27:04 (5 years ago)
Author:
sys
Message:

scormCam :

  • bug sm:itemBody en ctx fix
  • extension sm:callModel
  • test et genDeploy : items sans url ni fils sont éliminés.
Location:
trunk/Wsp_ModelingAssmnt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_ModelingAssmnt/es/content/scormCamCompoWebSiteTransf/xml.xed.xml

    r8867 r8868  
    4848                         
    4949        <se:lib> 
    50                 <attribute se:id="axis" se:bind="attribute" se:name="axis"> 
     50                <attribute se:id="att_axis" se:bind="attribute" se:name="axis"> 
    5151                        <wordsInput trim="true" filterRegExp="^[a-zA-Z0-9]+$" autocompleteProviderXPath="id('axis')"/> 
    5252                </attribute> 
     
    6868                                                        </choiceInput> 
    6969                                                </attribute> 
    70                                                 <se:ref se:refid="axis"/> 
     70                                                <se:ref se:refid="att_axis"/> 
    7171                                        </atts> 
    7272                                </element> 
     
    9494                        <childs> 
    9595                                <alternativeAlone se:bind="choice"> 
     96                                        <element se:name="sm:current" se:bind="element" forcefilled="true"> 
     97                                                <atts> 
     98                                                        <se:ref se:refid="att_axis"/> 
     99                                                </atts> 
     100                                        </element> 
    96101                                        <element se:name="sm:root" se:bind="element" forcefilled="true"> 
    97                                                 <atts> 
    98                                                         <se:ref se:refid="att_axis"/> 
    99                                                 </atts> 
    100                                         </element> 
    101                                         <element se:name="sm:current" se:bind="element" forcefilled="true"> 
    102102                                                <atts> 
    103103                                                        <se:ref se:refid="att_axis"/> 
     
    160160                                <element se:name="sm:axis" se:bind="element" se:card="?"> 
    161161                                        <atts> 
    162                                                 <se:ref se:refid="axis" se:name="code"/> 
     162                                                <se:ref se:refid="att_axis" se:name="code"/> 
    163163                                        </atts> 
    164164                                </element> 
     
    198198                                                                                <element se:name="sm:callSubModel" se:bind="element" forcefilled="true"> 
    199199                                                                                        <atts> 
    200                                                                                                 <se:ref se:refid="axis"/> 
     200                                                                                                <se:ref se:refid="att_axis"/> 
    201201                                                                                        </atts> 
    202202                                                                                </element> 
     
    218218                                                                                                <element se:name="sm:itemBody" se:bind="element"> 
    219219                                                                                                        <childs> 
    220                                                                                                                 <element se:name="sm:callSubModel" se:bind="element"> 
    221                                                                                                                         <atts> 
    222                                                                                                                                 <se:ref se:refid="axis"/> 
    223                                                                                                                         </atts> 
    224                                                                                                                 </element> 
     220                                                                                                                <alternative se:bind="choice"> 
     221                                                                                                                        <element se:name="sm:callSubModel" se:bind="element" insert="collapsed"> 
     222                                                                                                                                <atts> 
     223                                                                                                                                        <se:ref se:refid="att_axis"/> 
     224                                                                                                                                </atts> 
     225                                                                                                                        </element> 
     226                                                                                                                        <se:ref se:refid="sm:callModel"/> 
     227                                                                                                                </alternative> 
    225228                                                                                                        </childs> 
    226229                                                                                                </element> 
     
    261264                                                                        <element se:name="sm:itemBody" se:bind="element"> 
    262265                                                                                <childs> 
    263                                                                                         <element se:name="sm:callModel" se:bind="element"> 
    264                                                                                                 <atts> 
    265                                                                                                         <se:ref se:refid="axis"/> 
    266                                                                                                 </atts> 
    267                                                                                         </element> 
     266                                                                                        <se:ref se:refid="sm:callModel"/> 
    268267                                                                                </childs> 
    269268                                                                        </element> 
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/sma_scormCamCompoWebSiteTransf/bs.xml.xsl

    r8535 r8868  
    178178                <valeur code="getItemUrl_{generate-id()}" codecomposant="concat('getItemUrl_{generate-id()}_', generate-id())"> 
    179179                        <xsl0:choose> 
    180                         <xsl0:when test="$vRacineComp"> 
    181                                 <xsl0:attribute name="racine"><xsl0:value-of select="$vRacineComp"/></xsl0:attribute> 
    182                                 <source type="xpath-dynamique">resultat(agent('@@/getItemUrl'), dialog(concat('/@', switchAxis(resultatAgent('codeAgentSubM'), '<xsl0:value-of select="sm:callSubModel/@axis"/>'))))</source> 
    183                                 <valeur code="codeAgentSubM"> 
    184                                         <source type="xpath-statique">si(@sc:refUri, getIdFromPath(@sc:refUri), getIdNode(.))</source> 
    185                                 </valeur> 
    186                         </xsl0:when> 
    187                         <xsl0:otherwise> 
    188                                 <source type="xpath-dynamique">resultat(agent('@@/getItemUrl'), dialog(concat('/@', switchAxis(codeAgent('//'), '<xsl0:value-of select="sm:callModel/@axis"/>')))</source> 
    189                         </xsl0:otherwise> 
     180                                <xsl0:when test="$vRacineComp"> 
     181                                        <xsl0:attribute name="racine"><xsl0:value-of select="$vRacineComp"/></xsl0:attribute> 
     182                                        <xsl0:apply-templates mode="comps"/> 
     183                                </xsl0:when> 
     184                                <xsl0:otherwise> 
     185                                        <xsl0:apply-templates mode="comps"/> 
     186                                </xsl0:otherwise> 
    190187                        </xsl0:choose> 
    191188                </valeur> 
     189        </xsl0:template> 
     190        <xsl0:template match="sm:callSubModel" mode="comps"> 
     191                <source type="xpath-dynamique">resultat(agent('@@/getItemUrl'), dialog(concat('/@', switchAxis(resultatAgent('codeAgentSubM'), '<xsl0:value-of select="@axis"/>'))))</source> 
     192                <valeur code="codeAgentSubM"> 
     193                        <source type="xpath-statique">si(@sc:refUri, getIdFromPath(@sc:refUri), getIdNode(.))</source> 
     194                </valeur> 
     195        </xsl0:template> 
     196        <xsl0:template match="sm:callModel" mode="comps"> 
     197                <source type="xpath-dynamique">resultat(agent('@@/getItemUrl'), dialog(<xsl0:apply-templates select="sm:callModel/*" mode="callModel"/>))</source> 
    192198        </xsl0:template> 
    193199        <xsl0:template match="*" mode="comps"/> 
     
    256262        <xsl0:template match="sm:callModel" mode="callModel"> 
    257263                <valeur code="callModel_{generate-id()}"> 
    258                         <xsl0:apply-templates mode="callModel"/> 
    259                 </valeur> 
    260         </xsl0:template> 
    261         <xsl0:template match="sm:root" mode="callModel"> 
    262                 <source type="xpath-dynamique">resultatAgent(concat('@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>/scormCam'))</source> 
    263         </xsl0:template> 
    264         <xsl0:template match="sm:current" mode="callModel"> 
    265                 <source type="xpath-dynamique">resultatAgent(concat('@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>'), '/scormCam'))</source> 
    266         </xsl0:template> 
    267         <xsl0:template match="sm:lookForAscendants" mode="callModel"> 
    268                 <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"/>'), '/scormCam'))</source> 
    269         </xsl0:template> 
     264                        <source type="xpath-dynamique">resultatAgent(<xsl0:apply-templates mode="callModel"/>)</source> 
     265                </valeur> 
     266        </xsl0:template> 
     267        <xsl0:template match="sm:root" mode="callModel">concat('@', getIdFromPath(concat('src:', java:hGetUri(srcFileAgent('@@')))), '<xsl0:value-of select="getAxisSuffix(@axis)"/>/scormCam')</xsl0:template> 
     268        <xsl0:template match="sm:current" mode="callModel">concat('@', switchAxis(codeAgent('//'), '<xsl0:value-of select="@axis"/>'), '/scormCam')</xsl0:template> 
     269        <xsl0:template match="sm:lookForAscendants" mode="callModel">concat('@', switchAxis(codeAgent(lookForAncestorAgentByTypes($vDialog<xsl0:apply-templates mode="callModel"/>)[<xsl0:value-of select="si(@direction='rootToCurrent', 'last()', '1')"/>]), '<xsl0:value-of select="@axis"/>'), '/scormCam')</xsl0:template> 
    270270        <xsl0:template match="sm:callableModel" mode="callModel">,'<xsl0:value-of select="resultatAgent(concat('@', getIdFromPath(@sc:refUri), '/codeModel'))"/>'</xsl0:template> 
    271         <xsl0:template match="sm:agentPath" mode="callModel"> 
    272                 <source type="xpath-dynamique">resultatAgent(agent('<xsl0:value-of select="@path"/>', $vDialog))</source> 
    273         </xsl0:template> 
     271        <xsl0:template match="sm:agentPath" mode="callModel">agent('<xsl0:value-of select="@path"/>', $vDialog)</xsl0:template> 
    274272        <xsl0:template match="*" mode="callModel"/> 
    275273        <xsl0:template match="text()|@*" mode="callModel"/>      
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/sma_scormCamUiFrame/preview/preview.outline.xsl

    r8663 r8868  
    5858        </xsl:template> 
    5959         
    60         <xsl:template match="item[item]"> 
     60        <xsl:template match="item[descendant::item[string-length(@href)&gt;0]]"> 
    6161                <li class="prv_li prv_folder"> 
    6262                        <xsl:choose> 
    63                                 <xsl:when test="string-length(@href) &gt; 0"> 
     63                                <xsl:when test="string-length(@href)"> 
    6464                                        <a onclick="showPage('{@href}', this)"><span><xsl:value-of select="@title"/></span></a> 
    6565                                </xsl:when> 
     
    7575         
    7676        <xsl:template match="item"> 
    77                 <li class="prv_li"> 
    78                         <xsl:choose> 
    79                                 <xsl:when test="string-length(@href) &gt; 0"> 
    80                                         <a onclick="showPage('{@href}', this)"><span><xsl:value-of select="@title"/></span></a> 
    81                                 </xsl:when> 
    82                                 <xsl:otherwise> 
    83                                         <span><xsl:value-of select="@title"/></span> 
    84                                 </xsl:otherwise> 
    85                         </xsl:choose> 
    86                 </li> 
     77                <!-- un item sans fils et sans url est éliminé. --> 
     78                <xsl:if test="string-length(@href)"> 
     79                        <li class="prv_li"> 
     80                                <a onclick="showPage('{@href}', this)"><span><xsl:value-of select="@title"/></span></a> 
     81                        </li> 
     82                </xsl:if> 
    8783        </xsl:template> 
    8884         
    89         <xsl:template match="text()|@*" mode="in"/> 
     85        <xsl:template match="text()|@*"/> 
    9086         
    9187</xsl:stylesheet> 
  • trunk/Wsp_ModelingAssmnt/spaces/gen/modelBuilder/bs.doss/sma_scormGenDeploy/bsRoot.xml.xsl

    r8583 r8868  
    169169                                                </xsl:template> 
    170170                                                 
    171                                                 <xsl:template match="item[starts-with(@identifier, 'asset_') or starts-with(@identifier, 'sco_')]" mode="org"> 
    172                                                         <item identifier="I_{{@identifier}}" identifierref="R_{{@identifier}}" isvisible="true"> 
     171                                                <xsl:template match="item[descendant::item[string-length(@href)&gt;0]]" mode="org"> 
     172                                                        <item identifier="I_{{@identifier}}" isvisible="true"> 
     173                                                                <xsl:if test="string-length(@href)"><xsl0:attribute name="identifierref">R_{@identifier}</xsl0:attribute></xsl:if> 
    173174                                                        <title><xsl:value-of select="@title"/></title> 
    174175                                                        <xsl:apply-templates mode="org"/> 
    175176                                                </item> 
    176177                                                </xsl:template> 
    177                                                 <xsl:template match="item[starts-with(@identifier, 'fold_')]" mode="org"> 
    178                                                         <item identifier="I_{{@identifier}}"> 
    179                                                         <title><xsl:value-of select="@title"/></title> 
    180                                                         <xsl:apply-templates mode="org"/> 
    181                                                 </item> 
     178                                                <xsl:template match="item" mode="org"> 
     179                                                        <xsl:if test="string-length(@href)"> 
     180                                                                <item identifier="I_{{@identifier}}" identifierref="R_{{@identifier}}" isvisible="true"> 
     181                                                                <title><xsl:value-of select="@title"/></title> 
     182                                                        </item> 
     183                                                </xsl:if> 
    182184                                                </xsl:template> 
    183185                                                 
     
    200202                                                </xsl:template> 
    201203                                                 
    202                                                 <xsl:template match="item[starts-with(@identifier, 'fold_')]" mode="res"> 
    203                                                         <!-- rien à déclarer --> 
    204                                                         <xsl:apply-templates mode="res"/> 
    205                                                 </xsl:template> 
    206                                                 <xsl:template match="item[starts-with(@identifier, 'asset_')]" mode="res"> 
    207                                                         <resource identifier="R_{{@identifier}}" type="webcontent" adlcp:scormtype="asset" href="{{@href}}"> 
     204                                                <xsl:template match="item[string-length(@href)]" mode="res"> 
     205                                                        <resource identifier="R_{{@identifier}}" type="webcontent" adlcp:scormtype="{{si(starts-with(@identifier, 'asset_'), 'asset', 'sco')}}" href="{{@href}}"> 
    208206                                                 <metadata> 
    209207                                                    <schema>ADL SCORM</schema> 
     
    214212                                                 <dependency identifierref="fullResList"/> 
    215213                                              </resource> 
    216                                                 </xsl:template> 
    217                                                 <xsl:template match="item[starts-with(@identifier, 'sco_')]" mode="res"> 
    218                                                         <resource identifier="R_{{@identifier}}" type="webcontent" adlcp:scormtype="sco" href="{{@href}}"> 
    219                                                  <metadata> 
    220                                                     <schema>ADL SCORM</schema> 
    221                                                     <schemaversion><xsl0:value-of select="$vMetaVersion"/></schemaversion> 
    222                                                     <adlcp:location><xsl:value-of select="@href"/></adlcp:location> 
    223                                                  </metadata> 
    224                                                  <!-- file ...--> 
    225                                                  <dependency identifierref="fullResList"/> 
    226                                               </resource> 
     214                                              <xsl:apply-templates mode="res"/> 
     215                                                </xsl:template> 
     216                                                 
     217                                                <xsl:template match="item" mode="res"> 
     218                                                        <xsl:apply-templates mode="res"/> 
    227219                                                </xsl:template> 
    228220                                                 
Note: See TracChangeset for help on using the changeset viewer.