Re: xslt tester la balise mere

Stéphane Bonhomme <[email protected]>
Newsgroups gmane.text.xml.french.tech
Message-ID <[email protected]>
<xsl:choose>

  <xsl:when test="parent::NouvellePhrase">

     <!--traitement-->

  </xsl:when>

  <xsl:otherwise>

   <!--autre traitement-->

  </xsl:otherwise>

</xsl:choose>


S.B.

[email protected] wrote:

>
>
>Bonjour,
>
>Quelle est la syntaxe dans une xslt pour tester si la balise mere est <
>NouvellePhrase >  ?
>
>Pour le moment j'ai fais:
>            <xsl:if test="../../NouvellePhrase != ''">
>                  traitement
>            </xsl:if>
>            <!--sinon, on ne fait rien-->
>            <xsl:if test="../../NouvellePhrase = ''">
>                  autre traitement
>            </xsl:if>
>Le 1er if marche mais pas le deuxieme, du coup je n'ai que le premier cas
>qui fonctionne, sacahant que le deuxieme if correspondrait au else du 1er
>if ...
>
>Merci
>
>
>--
>Devenez redacteur <XML>fr et contribuez au developpement du
>xml francophone (http://xmlfr.org/infos/redacteurs/) !
>
>Liste de diffusion "[email protected]" (http://xmlfr.org).
>
>Cette liste est a votre disposition pour discuter en francais de 
>tout sujet technique lie a XML.
>
>Pour resilier votre abonnement, envoyez un message contenant 
>la commande "unsubscribe" a [email protected]
>(mailto:[email protected]?Subject=unsubscribe)
>
>---------------------------------------------------------------------------------------
>Wanadoo vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
>Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>  
>


-- 
   Stéphane Bonhomme           --           Exselt Services

Formations, Conseil et Réalisations en Ingénierie Documentaire,
            Technologies Web et Logiciels Libres
     [email protected]   -   http://www.exselt.com
        04 76 17 09 40        /      06 88 57 27 08
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.