Ignore:
Timestamp:
04/22/08 12:25:28 (16 years ago)
Author:
pinsard
Message:

some improvements in wiki production (hyperlinks)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/xmldoc/saxo_tracwiki.xsl

    r354 r355  
    161161</xsl:template> 
    162162 
    163 <xsl:template match="d:screen/d:userinput/d:parameter/d:replaceable"> 
    164 <code class="replaceable"><xsl:value-of select="."/></code> 
    165 </xsl:template> 
    166  
    167  
    168163<xsl:template match="d:blockquote"> 
    169164  <xsl:text>  </xsl:text><xsl:apply-templates/> 
     
    201196</xsl:template> 
    202197 
    203 <xsl:template match="d:link[contains(@xl:href,'idldoc_html_output')]"> 
    204  <xsl:text>[http://forge.ipsl.jussieu.fr/saxo/download/idldoc_html_output/</xsl:text> 
    205 <xsl:message><xsl:value-of select="substring-after(@xl:href,'idldoc_html_output/')"/></xsl:message> 
    206 <xsl:message>++Download</xsl:message> 
    207 <!-- ++ 
    208 <xsl:value-of select="substring-after(@xl:href,'idldoc_html_output/')"/> 
    209 --> 
    210 <xsl:text>]</xsl:text> 
    211 </xsl:template> 
    212  
    213 <xsl:template match="d:link[contains(@xl:href,'idlfiles/')]"> 
    214  <xsl:message>++idlfiles</xsl:message> 
    215  <xsl:text>[source:/trunk/SRC/Documentation/idlfiles/</xsl:text><xsl:value-of select="substring-after(@xl:href,'idlfiles/')"/> <xsl:value-of select="normalize-space(.)"/><xsl:text>]</xsl:text> 
    216 </xsl:template> 
    217  
    218  
    219 <xsl:template match="d:para/d:link[@xl:href]"> 
    220 <xsl:variable name="wikilink"> 
     198<xsl:template match="d:link[@xl:href]"> 
     199<xsl:variable name="link"> 
    221200 <xsl:choose> 
    222201  <xsl:when test="contains(@xl:href,'firststeps.html')"> 
     
    258237  <xsl:when test="contains(@xl:href,'websaxo.html')"> 
    259238   <xsl:text>wiki:WikiStart</xsl:text> 
     239  </xsl:when> 
     240  <xsl:when test="contains(@xl:href,'../../Tests/')"> 
     241   <xsl:text>source:/trunk/SRC/Tests/</xsl:text><xsl:value-of select="substring-after(@xl:href,'../../Tests/')"/> 
     242  </xsl:when> 
     243  <xsl:when test="contains(@xl:href,'idldoc_html_output')"> 
     244 <xsl:text>http://forge.ipsl.jussieu.fr/saxo/download/idldoc_html_output/</xsl:text><xsl:value-of select="substring-after(@xl:href,'idldoc_html_output/')"/> 
     245  </xsl:when> 
     246  <xsl:when test="contains(@xl:href,'idlfiles/')"> 
     247 <xsl:text>source:/trunk/SRC/Documentation/xmldoc/idlfiles/</xsl:text><xsl:value-of select="substring-after(@xl:href,'idlfiles/')"/> 
     248  </xsl:when> 
     249  <xsl:when test="contains(@xl:href,'figpng/')"> 
     250   <xsl:text>source:/trunk/SRC/Documentation/xmldoc/figpng/</xsl:text><xsl:value-of select="substring-after(@xl:href,'figpng/')"/> 
    260251  </xsl:when> 
    261252  <xsl:otherwise> 
     
    264255 </xsl:choose> 
    265256</xsl:variable> 
    266 <xsl:text>[</xsl:text><xsl:value-of select="$wikilink"/> <xsl:text> </xsl:text><xsl:value-of select="."/> <xsl:text>]</xsl:text> 
     257<xsl:text>[</xsl:text><xsl:value-of select="$link"/> <xsl:text> </xsl:text><xsl:value-of select="."/> <xsl:text>]</xsl:text> 
    267258</xsl:template> 
    268259 
     
    289280 
    290281<xsl:template match="d:replaceable"> 
    291 <!-- 
    292 +++ pas de ''' dans un truc qui est entre {{{...}}} 
    293 --> 
    294   <xsl:text>'''''</xsl:text><xsl:value-of select="."/><xsl:text>'''''</xsl:text> 
     282 <xsl:choose> 
     283  <xsl:when test="local-name(..)='userinput'"> 
     284   <code class="replaceable"><xsl:value-of select="."/></code> 
     285  </xsl:when> 
     286  <xsl:when test="local-name(..)='parameter'"> 
     287   <code class="replaceable"><xsl:value-of select="."/></code> 
     288  </xsl:when> 
     289  <xsl:otherwise> 
     290   <xsl:text>'''''</xsl:text><xsl:value-of select="."/><xsl:text>'''''</xsl:text> 
     291  </xsl:otherwise> 
     292 </xsl:choose> 
    295293</xsl:template> 
    296294 
     
    331329<xsl:template match="d:xref">  
    332330  <xsl:variable name="target" select="key('id',@linkend)[1]"/> 
    333   <xsl:text>[#</xsl:text><xsl:value-of select="normalize-space(//d:sect1[normalize-space(@xml:id='$target')]/d:title)"/><xsl:text>]</xsl:text> 
     331  <xsl:text>[#</xsl:text><xsl:value-of select="translate(normalize-space(//d:sect1[normalize-space(@xml:id='$target')]/d:title),' ','')"/><xsl:text> </xsl:text> <xsl:value-of select="normalize-space(//d:sect1[normalize-space(@xml:id='$target')]/d:title)"/><xsl:text>]</xsl:text> 
    334332</xsl:template> 
    335333 
Note: See TracChangeset for help on using the changeset viewer.