🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fr.comp.text.xml
Article #9446

Re: Insertion d'attribut

#9446
From: cib
Date: Fri, 06 Apr 2001 18:11
49 lines
2526 bytes
Merci pour ton aide, je ne recopiais pas l'�l�ment auquel je voulais ajouter
l'attribut avec un <xsl:copy> . Bon, je vais � mon rythme et heureusement
que tu es encore l� pour me donner des astuces. Tu m'as d�j� aid� pour les
entit�s.
Tu fais quoi pour t'y conna�tre autant?
Par chez moi, il n'y a personne qui s'y connaisse en xml, alors heureusement
qu'il y a quelques groupes comme celui-l�.
Merci
 Cib = Fran�ois
"Alain Ketterlin" <alain@dpt-info.u-strasbg.fr> a �crit dans le message
news: wyae5xrxbz.fsf@polya.u-strasbg.fr...
> "cib" <cibci1@caramail.com> writes:
>
> > Comment ajouter un attribut � partir d'un
> > <xsl:template match="p">
> > ?
> > Un peu d'aide s'il vous plait.
>
> Tu peux ajouter un attribut a n'importe quel element du resultat, que
> celui-ci soit produit
>
> 1) litteralement : par ex.
>
>    <p><xsl:attribute name="id">idxxx</xsl:attribute>...</p>
>
> 2) par <xsl:element> : par ex.
>
>    <xsl:element name="p">
>      <xsl:attribute name="id">idxxx</xsl:attribute>
>      ...
>    </xsl:element>
>
> 3) par <xsl:copy>
>
> Dans ton cas, j'ai l'impression que tu veux recopier le contenu de
> chaque paragraphe en ajoutant l'attribut. Donc :
>
> <xsl:template match="p">
>   <xsl:copy>
>     <xsl:attribute name="id">idxxx</xsl:attribut>
>     ...
>   </xsl:copy>
> </xsl:template>
>
> A la place des ... tu mets soit <xsl:apply-templates> soit
> <xsl:copy-of> : tout depend de ce que tu veux faire avec les autres
> elements, et jusqu'a quelle profondeur tu veux numeroter.
>
> -- Alain.
Technical Details
Message-ID: <9al077$1a9$1@wanadoo.fr>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!wanadoo.fr!not-for-mail
References: <9ad53p$4rh$1@wanadoo.fr> <wyae5xrxbz.fsf@polya.u-strasbg.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,d43ad1d81609108b
X-Google-Attributes: gid114f60,public
X-Google-ArrivalTime: 2001-04-06 11:08:52 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!wanadoo.fr!not-for-mail
From: "cib" <cibci1@caramail.com>
Newsgroups: fr.comp.text.xml
Subject: Re: Insertion d'attribut
Date: Fri, 6 Apr 2001 20:11:14 +0200
Organization: Wanadoo, l'internet avec France Telecom
Lines: 51
Message-ID: <9al077$1a9$1@wanadoo.fr>
References: <9ad53p$4rh$1@wanadoo.fr> <wyae5xrxbz.fsf@polya.u-strasbg.fr>
NNTP-Posting-Host: ca-ol-bordeaux-17-56.abo.wanadoo.fr
X-Trace: wanadoo.fr 986580007 1353 195.6.78.56 (6 Apr 2001 18:00:07 GMT)
X-Complaints-To: abuse@wanadoo.fr
NNTP-Posting-Date: 6 Apr 2001 18:00:07 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400