Changeset 9274

Show
Ignore:
Timestamp:
12.06.2007 17:26:51 (3 years ago)
Author:
anp
Message:

Ajout de @hideIfNoEntry sur WIndex. Permet de ne pas afficher les index (liste des ressources, ...) si ils sont vides

Location:
trunk/Wsp_Modeling
Files:
1 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/Wsp_Modeling/es/content/odTemplate/odTemplateText/xml.xed.xml

    r9261 r9274  
    475475                                                                                <wordsInput notnull="true" trim="true" flex="1" autocompleteProviderXPath="id('categorySequence')"/> 
    476476                                                                        </attribute> 
     477                                                                        <attribute se:bind="attribute" se:name="hideIfNoEntry" se:defaultvalue="yes" tooltiptext="Masquer si il n'y a aucune entrée à afficher dans cet index"> 
     478                                                                                <choiceInput> 
     479                                                                                        <ciItem label="yes"/> 
     480                                                                                        <ciItem label="no"/> 
     481                                                                                </choiceInput> 
     482                                                                        </attribute> 
    477483                                                                </atts> 
    478484                                                                <childs> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odGenerator.xml

    r8895 r9274  
    201201                </affichage> 
    202202                <affichage code="rootPostProcessing"> 
    203                         <urlPage>bs.doss/_root/pp.content.xsl.xsl</urlPage> 
     203                        <urlPage>bs.doss/_root/pp.content.xsl</urlPage> 
    204204                        <page> 
    205205                                <modele>xsl</modele> 
     
    267267                        </page> 
    268268                </affichage> 
     269                <affichage code="rootPostProcessing.n2"> 
     270                        <urlPage>bs.doss/_root/pp.content.n2.xsl</urlPage> 
     271                        <page> 
     272                                <modele>xsl</modele> 
     273                                <zone cle="mainZone" type="xpath-dynamique">resultatAgent('//agentOdTemplate', 'behaviorSheetFiles.rootPostProcessing.n2')</zone> 
     274                                <info cle="ns:1">xalan=http://xml.apache.org/xalan</info> 
     275                                <info cle="ns:2">sc=http://www.utc.fr/ics/scenari/v3/core</info> 
     276                                <info cle="ns:3">sp=http://www.utc.fr/ics/scenari/v3/primitive</info> 
     277                                <info cle="ns:4">sl=http://www.utc.fr/ics/scenari/v3/library</info> 
     278                                <info cle="ns:5">scOd=http://www.utc.fr/ics/scenari/v3/openDocument</info> 
     279                                <info cle="ns:6a">style=urn:oasis:names:tc:opendocument:xmlns:style:1.0</info> 
     280                                <info cle="ns:6b">draw=rn:oasis:names:tc:opendocument:xmlns:drawing:1.0</info> 
     281                                <info cle="ns:6c">dc=http://purl.org/dc/elements/1.1/</info> 
     282                                <info cle="ns:6d">meta=urn:oasis:names:tc:opendocument:xmlns:meta:1.0</info> 
     283                                <info cle="ns:6e">number=urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0</info> 
     284                                <info cle="ns:6f">svg=http://www.w3.org/2000/svg</info> 
     285                                <info cle="ns:6g">chart=urn:oasis:names:tc:opendocument:xmlns:chart:1.0</info> 
     286                                <info cle="ns:6h">dr3d=urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0</info> 
     287                                <info cle="ns:6i">math=http://www.w3.org/1998/Math/MathML</info> 
     288                                <info cle="ns:6j">form=urn:oasis:names:tc:opendocument:xmlns:form:1.0</info> 
     289                                <info cle="ns:6k">script=urn:oasis:names:tc:opendocument:xmlns:script:1.0</info> 
     290                                <info cle="ns:6l">ooo=http://openoffice.org/2004/office</info> 
     291                                <info cle="ns:6m">ooow=http://openoffice.org/2004/writer</info> 
     292                                <info cle="ns:6n">oooc=http://openoffice.org/2004/calc</info> 
     293                                <info cle="ns:6o">dom=http://www.w3.org/2001/xml-events</info> 
     294                                <info cle="ns:6p">xforms=http://www.w3.org/2002/xforms</info> 
     295                                <info cle="ns:6q">xsd=http://www.w3.org/2001/XMLSchema</info> 
     296                                <info cle="ns:6r">xsi=http://www.w3.org/2001/XMLSchema-instance</info> 
     297                                <info cle="ns:6s">office=urn:oasis:names:tc:opendocument:xmlns:office:1.0</info> 
     298                                <info cle="ns:6t">text=urn:oasis:names:tc:opendocument:xmlns:text:1.0</info> 
     299                                <info cle="ns:6u">table=urn:oasis:names:tc:opendocument:xmlns:table:1.0</info> 
     300                                <info cle="ns:6v">fo=http://www.w3.org/1999/XSL/Format</info> 
     301                                <info cle="ns:6w">svg=urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0</info> 
     302                                <info cle="ns:6x">xlink=http://www.w3.org/1999/xlink</info> 
     303                                <info cle="ns:6y">presentation=urn:oasis:names:tc:opendocument:xmlns:presentation:1.0</info> 
     304                                <info cle="xslExcludePrefix:1">xalan</info> 
     305                                <info cle="xslExcludePrefix:2">sc</info> 
     306                                <info cle="xslExcludePrefix:3">sp</info> 
     307                                <info cle="xslExcludePrefix:4">sl</info> 
     308                                <info cle="xslExcludePrefix:5">scOd</info> 
     309                                <info cle="xslExcludePrefix:6a">style</info> 
     310                                <info cle="xslExcludePrefix:6b">draw</info> 
     311                                <info cle="xslExcludePrefix:6c">dc</info> 
     312                                <info cle="xslExcludePrefix:6d">meta</info> 
     313                                <info cle="xslExcludePrefix:6e">number</info> 
     314                                <info cle="xslExcludePrefix:6f">svg</info> 
     315                                <info cle="xslExcludePrefix:6g">chart</info> 
     316                                <info cle="xslExcludePrefix:6h">dr3d</info> 
     317                                <info cle="xslExcludePrefix:6i">math</info> 
     318                                <info cle="xslExcludePrefix:6j">form</info> 
     319                                <info cle="xslExcludePrefix:6k">script</info> 
     320                                <info cle="xslExcludePrefix:6l">ooo</info> 
     321                                <info cle="xslExcludePrefix:6m">ooow</info> 
     322                                <info cle="xslExcludePrefix:6n">oooc</info> 
     323                                <info cle="xslExcludePrefix:6o">dom</info> 
     324                                <info cle="xslExcludePrefix:6p">xforms</info> 
     325                                <info cle="xslExcludePrefix:6q">xsd</info> 
     326                                <info cle="xslExcludePrefix:6r">xsi</info> 
     327                                <info cle="xslExcludePrefix:6s">office</info> 
     328                                <info cle="xslExcludePrefix:6t">text</info> 
     329                                <info cle="xslExcludePrefix:6u">table</info> 
     330                                <info cle="xslExcludePrefix:6v">fo</info> 
     331                                <info cle="xslExcludePrefix:6w">svg</info> 
     332                                <info cle="xslExcludePrefix:6x">xlink</info> 
     333                                <info cle="xslExcludePrefix:6y">presentation</info> 
     334                        </page> 
     335                </affichage> 
    269336                <!-- fichiers li��penDocument--> 
    270337                <groupAffichage code="writeOdFile"> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odGenerator/bsRoot.xml

    r8888 r9274  
    6363                <!--XSL de traitement du content (heading, ...) --> 
    6464                <transformationxsl href="[![agent=//behaviorSheet/rootPostProcessing;arguments=act:]!]"/> 
     65                <transformationxsl href="[![agent=//behaviorSheet/rootPostProcessing.n2;arguments=act:]!]"/> 
    6566        </valeur> 
    6667         
     
    7071                <!--XSL de traitement du content (heading, ...) : pour le content contenu dans les entetes --> 
    7172                <transformationxsl href="[![agent=//behaviorSheet/rootPostProcessing;arguments=act:]!]"/> 
     73                <transformationxsl href="[![agent=//behaviorSheet/rootPostProcessing.n2;arguments=act:]!]"/> 
    7274        </valeur> 
    7375 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText.xml

    r9060 r9274  
    109109                <source type="xslOnSrc-dynamique" href="bs:pp.content.xsl.xsl"/> 
    110110        </valeur> 
     111 
     112        <valeur code="behaviorSheetFiles.rootPostProcessing.n2"> 
     113                <source type="xslOnSrc-dynamique" href="bs:pp.content.n2.xsl.xsl"/> 
     114        </valeur> 
    111115         
    112116        <!-- ### --> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText/pp.content.xsl.xsl

    r9232 r9274  
    7171                #          - <scOd:ifText>... : prise en compte de la balise SSi il y a un contenu textuel dans l'un des fils 
    7272                #            <scOd:notIfText>... : annule l'effet de scOd:ifText 
     73                #          - <scOd:ifSequence category="xxx">... : prise en compte de la balise SSi il existe un text:sequence[@text:name='xxx'] 
    7374                #                  - <scOd:listItem>... : permet de créer plusieurs niveaux de liste (correspondance avec la DTD OD) 
    7475                #       </scOd:content> 
     
    443444                        <!-- TODO --> 
    444445                </xsl:template> 
     446                 
     447                <!-- Elelemnts traités dans une postXsl ultérieure --> 
     448                <xsl:template match="scOd:ifSequence"> 
     449                        <xsl:copy> 
     450                                <xsl:apply-templates select="@*|node()|text()"/> 
     451                        </xsl:copy> 
     452                </xsl:template> 
    445453                                                         
    446454                <!-- par défaut, on recopie --> 
     
    467475                </xsl0:choose> 
    468476        </xsl0:template> 
    469                  
     477         
    470478</xsl0:stylesheet> 
  • trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText/xGetAreaContent.xsl

    r9273 r9274  
    266266                <xsl:variable name="vStyle_item" select="resultatAgent('//agentTemplateScData', concat($vPageCode, '/', $vBlockCode,'/item/getOdStyleName'))"/> 
    267267                <xsl:variable name="vAgentContentFile" select="resultatAgent('//agentTemplateScData', concat($vPageCode, '/', $vBlockCode, '/agentContentFile'))"/> 
    268                 <text:illustration-index text:style-name="{$vStyle_section}" text:protected="true" text:name="{chaineProtegeAttHtml(sm:title)}"> 
    269                         <text:illustration-index-source text:caption-sequence-name="{@refCategory}" text:caption-sequence-format="text"> 
    270                                 <text:index-title-template text:style-name="{$vStyle_title}"><xsl:value-of select="sm:title"/></text:index-title-template> 
    271                                 <xsl:for-each select="computeNodeAgent(concat($vAgentContentFile, '/getContent'))//text:illustration-index-source/text:illustration-index-entry-template"> 
    272                                         <xsl:copy-of select="."/> 
    273                                 </xsl:for-each> 
    274                                 <!--text:illustration-index-entry-template text:style-name="{$vStyle_item}"> 
    275                                         <text:index-entry-text/> 
    276                                         <text:index-entry-tab-stop style:type="right" style:leader-char="."/> 
    277                                         <text:index-entry-page-number/> 
    278                                 </text:illustration-index-entry-template--> 
    279                         </text:illustration-index-source> 
    280                         <text:index-body> 
    281                                 <text:index-title text:style-name="{$vStyle_section}" text:name="{chaineProtegeAttHtml(sm:title)}"> 
    282                                         <text:p text:style-name="{$vStyle_title}"><xsl:value-of select="sm:title"/></text:p> 
    283                                 </text:index-title> 
    284                                 <!--text:p text:style-name="[![agent=../../stResolver/item/name]!]">element 1: [![agent=../../stResolver/title/displayName]!]<text:tab/></text:p--> 
    285                         </text:index-body> 
    286                 </text:illustration-index> 
    287                 <text:p text:style-name="odNoDisplay">&#160;</text:p><!-- NOTE : OO peut planter sans ce paragraphe : transformation odt2doc --> 
     268                 
     269                <xsl:variable name="vOdContent"> 
     270                                <text:illustration-index text:style-name="{$vStyle_section}" text:protected="true" text:name="{chaineProtegeAttHtml(sm:title)}"> 
     271                                <text:illustration-index-source text:caption-sequence-name="{@refCategory}" text:caption-sequence-format="text"> 
     272                                        <text:index-title-template text:style-name="{$vStyle_title}"><xsl:value-of select="sm:title"/></text:index-title-template> 
     273                                        <xsl:for-each select="computeNodeAgent(concat($vAgentContentFile, '/getContent'))//text:illustration-index-source/text:illustration-index-entry-template"> 
     274                                                <xsl:copy-of select="."/> 
     275                                        </xsl:for-each> 
     276                                </text:illustration-index-source> 
     277                                <text:index-body> 
     278                                        <text:index-title text:style-name="{$vStyle_section}" text:name="{chaineProtegeAttHtml(sm:title)}"> 
     279                                                <text:p text:style-name="{$vStyle_title}"><xsl:value-of select="sm:title"/></text:p> 
     280                                        </text:index-title> 
     281                                </text:index-body> 
     282                        </text:illustration-index> 
     283                        <text:p text:style-name="odNoDisplay">&#160;</text:p><!-- NOTE : OO peut planter sans ce paragraphe : transformation odt2doc --> 
     284                </xsl:variable> 
     285                 
     286                <xsl:choose> 
     287                        <xsl:when test="not(@hideIfNoEntry) or @hideIfNoEntry='yes'"><!-- Affichage SSi il y a au moins une entrée --> 
     288                                <scOd:ifSequence category="{@refCategory}"> 
     289                                        <xsl:copy-of select="$vOdContent"/> 
     290                                </scOd:ifSequence> 
     291                        </xsl:when> 
     292                        <xsl:otherwise> 
     293                                <xsl:copy-of select="$vOdContent"/> 
     294                        </xsl:otherwise> 
     295                </xsl:choose> 
    288296        </xsl:template> 
    289297