Changeset 9602
- Timestamp:
- 09/05/07 10:59:04 (5 years ago)
- Location:
- trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText
- Files:
-
- 2 edited
-
pp.content.n2.xsl.xsl (modified) (2 diffs)
-
pp.content.xsl.xsl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText/pp.content.n2.xsl.xsl
r9274 r9602 49 49 </xsl:if> 50 50 </xsl:template> 51 52 <!-- gestion des heading --> 53 <xsl:template match="scOd:section"> 54 <xsl:variable name="vLevel" select="count(ancestor::*[name()='scOd:section'])"/><!-- profondeur --> 55 <xsl:if test="@break and @break='before'"><text:p text:style-name="scodBreakBefore"/></xsl:if> 56 <xsl:choose> 57 <xsl:when test="$vLevel=0"><!-- titre principal --> 58 <xsl0:variable name="vMainTitleStyleName" select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/mainTitle/content/getOdStyleName'))"/> 59 <xsl:if test="string-length(normalize-space(scOd:title))>0"><text:p text:style-name="{$vMainTitleStyleName}"><xsl:value-of select="scOd:title"/></text:p></xsl:if> 60 </xsl:when> 61 <xsl:otherwise><!-- autres niveaux de titre --> 62 <xsl:variable name="vStyle"> 63 <xsl0:variable name="vNumberLevel" select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/heading/getNumberLevel'))"/> 64 <xsl0:if test="string-length(normalize-space($vNumberLevel))>0"> 65 <xsl:choose> 66 <xsl0:call-template name="tStyleLevelResolver"> 67 <xsl0:with-param name="pIteration" select="$vNumberLevel"/> 68 </xsl0:call-template> 69 </xsl:choose> 70 </xsl0:if> 71 </xsl:variable> 72 <xsl:if test="string-length(normalize-space(scOd:title))>0"><text:h text:style-name="{{$vStyle}}" text:outline-level="{{$vLevel}}"><xsl:value-of select="scOd:title"/></text:h></xsl:if> 73 </xsl:otherwise> 74 </xsl:choose> 75 <xsl:apply-templates select="scOd:content/* | scOd:content/text()"/> 76 <xsl:if test="@break and @break='after'"><text:p text:style-name="scodBreakAfter"/></xsl:if> 77 </xsl:template> 51 78 52 79 <!-- par défaut, on recopie --> … … 58 85 59 86 </xsl0:template> 87 88 <!-- Résolution du style des parties --> 89 <xsl0:template name="tStyleLevelResolver"> 90 <xsl0:param name="pIteration"/> 91 <xsl0:choose> 92 <xsl0:when test="number($pIteration)>=1"> 93 <xsl:when test="$vLevel={$pIteration}"><xsl0:value-of select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/heading/level', $pIteration,'/getOdStyleName'))"/></xsl:when> 94 <xsl0:call-template name="tStyleLevelResolver"> 95 <xsl0:with-param name="pIteration" select="$pIteration - 1"/> 96 </xsl0:call-template> 97 </xsl0:when> 98 </xsl0:choose> 99 </xsl0:template> 60 100 61 101 </xsl0:stylesheet> -
trunk/Wsp_Modeling/spaces/gen/modelBuilder/bs.doss/sm_odTemplateText/pp.content.xsl.xsl
r9596 r9602 166 166 </xsl:choose> 167 167 </xsl:template> 168 169 <!-- gestion des heading --> 170 <xsl:template match="scOd:section"> 171 <xsl:variable name="vLevel" select="count(ancestor::*[name()='scOd:section'])"/><!-- profondeur --> 172 <xsl:if test="@break and @break='before'"><text:p text:style-name="scodBreakBefore"/></xsl:if> 173 <xsl:choose> 174 <xsl:when test="$vLevel=0"><!-- titre principal --> 175 <xsl0:variable name="vMainTitleStyleName" select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/mainTitle/content/getOdStyleName'))"/> 176 <xsl:if test="string-length(normalize-space(scOd:title))>0"><text:p text:style-name="{$vMainTitleStyleName}"><xsl:value-of select="scOd:title"/></text:p></xsl:if> 177 </xsl:when> 178 <xsl:otherwise><!-- autres niveaux de titre --> 179 <xsl:variable name="vStyle"> 180 <xsl0:variable name="vNumberLevel" select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/heading/getNumberLevel'))"/> 181 <xsl0:if test="string-length(normalize-space($vNumberLevel))>0"> 182 <xsl:choose> 183 <xsl0:call-template name="tStyleLevelResolver"> 184 <xsl0:with-param name="pIteration" select="$vNumberLevel"/> 185 </xsl0:call-template> 186 </xsl:choose> 187 </xsl0:if> 188 </xsl:variable> 189 <xsl:if test="string-length(normalize-space(scOd:title))>0"><text:h text:style-name="{{$vStyle}}" text:outline-level="{{$vLevel}}"><xsl:value-of select="scOd:title"/></text:h></xsl:if> 190 </xsl:otherwise> 191 </xsl:choose> 192 <xsl:apply-templates select="scOd:content/* | scOd:content/text()"/> 193 <xsl:if test="@break and @break='after'"><text:p text:style-name="scodBreakAfter"/></xsl:if> 194 </xsl:template> 195 168 196 169 <!-- gestion des dataBlock --> 197 170 <xsl:template name="getDataBlockList"> … … 457 430 </xsl:template> 458 431 459 <!-- Elelemnts traités dans une postXsl ultérieure -->460 <xsl:template match="scOd:ifSequence ">432 <!-- Elelemnts traités dans une postXsl ultérieure (aprés résolution des dataBlock) --> 433 <xsl:template match="scOd:ifSequence | scOd:section"> 461 434 <xsl:copy> 462 435 <xsl:apply-templates select="@*|node()|text()"/> … … 474 447 <xsl:template match="scOd:dataBlockDeclaration"/><!-- déja traité plus haut --> 475 448 </xsl0:template> 476 477 <!-- pour la gestion des headings --> 478 <xsl0:template name="tStyleLevelResolver"> 479 <xsl0:param name="pIteration"/> 480 <xsl0:choose> 481 <xsl0:when test="number($pIteration)>=1"> 482 <xsl:when test="$vLevel={$pIteration}"><xsl0:value-of select="resultatAgent('//agentTemplateScData', concat($vCodeTemplate, '/heading/level', $pIteration,'/getOdStyleName'))"/></xsl:when> 483 <xsl0:call-template name="tStyleLevelResolver"> 484 <xsl0:with-param name="pIteration" select="$pIteration - 1"/> 485 </xsl0:call-template> 486 </xsl0:when> 487 </xsl0:choose> 488 </xsl0:template> 489 449 490 450 </xsl0:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.