| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl cd67" xmlns:cd67 ="http://my.functions" >
- <!-- fonctionnalité cd67 pour remplacement de chaine en c# -->
- <msxsl:script implements-prefix="cd67" language="c#">
- <![CDATA[
-
-
- public string ReplaceChaine( string inp, string rec , string rep){
-
- return inp.Replace(rec, rep);
-
- }
- ]]>
- </msxsl:script>
-
- <xsl:template match="lst" mode="exportcustom">
- <div class="blocks block_rss abonner-rss">
- <i class="icon-"></i>
- <a href="/proxy/export.ashx?{$urlini}&wt=xslt&tr=xml2rss.xslt&hl=false" target="rss">
- Rss
- </a>
- </div>
- </xsl:template>
-
-
- <!-- export -->
- <xsl:template match="lst" mode="export">
- <ul class="export">
- <li>
- <a href="/proxy/export.ashx?{$urlini}&wt=csv">csv</a>
- </li>
- <li>
- <a href="/proxy/export.ashx?{$urlini}&wt=xml&hl=false&omitHeader=true">xml</a>
- </li>
- <li>
- <a href="/proxy/export.ashx?{$urlini}&wt=json&hl=false&omitHeader=true">json</a>
- </li>
- <li>
- <a href="/proxy/export.ashx?{$urlini}&wt=xslt&tr=xml2rss.xslt&hl=false">rss</a>
- </li>
- </ul>
- </xsl:template>
-
- <!-- affichage des resultats par défaut -->
- <xsl:template match="doc" mode="default">
- <li>
- <ul>
- <xsl:apply-templates select="int|att|arr|str" mode="doc"/>
- </ul>
- </li>
- </xsl:template>
- <!-- mise en forme des élémenrs de résultats par défaut-->
- <xsl:template match="int|arr|str" mode="doc">
- <li>
- <strong>
- <xsl:value-of select="@name"/> :
- </strong>
- <xsl:value-of select="node()|descendant-or-self::node()"/>
- <br/>
- </li>
- </xsl:template>
-
- <!-- affichage pas de résultat -->
- <xsl:template name="noresult">
-
- <div class="nombre_resultat float">
- <p>
- Aucun résultat pour votre recherche : <xsl:value-of select="$query" />
- </p>
- </div>
- </xsl:template>
- <!-- fin affichage pas de résultat -->
-
- <xsl:template match="@*">
- <xsl:attribute name="{name()}">
- <xsl:value-of select="normalize-space(.)" />
- </xsl:attribute>
- </xsl:template>
-
- <xsl:template name="nl2br">
- <xsl:param name="contents" />
- <xsl:choose>
- <xsl:when test="contains($contents, ' ')">
- <xsl:value-of select="substring-before($contents, ' ')" disable-output-escaping="yes" />
- <br />
- <xsl:call-template name="nl2br">
- <xsl:with-param name="contents" select="substring-after($contents, ' ')" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$contents" disable-output-escaping="yes" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- </xsl:stylesheet>
|