Article View: fr.comp.text.xml
Article #8290Re: a href : au secours
From: Thomas Broyer
Date: Sat, 10 Nov 2001 13:56
Date: Sat, 10 Nov 2001 13:56
51 lines
2289 bytes
2289 bytes
In <1005388896.919580@remus.infonie.fr>, Emmanuel wrote:
> voil� j'ai un probl�me qui me prend la t�te depuis quelques jours,
> je n'arrive pas � construire un lien de type href � partir de valeurs
> d'une page xml,
> un petit exemple :
> <nom>francois</nom>
> <prenom>pignon</prenom>
> <adresse>placard.fr</adresse>
>
> devrait donner
> <a href="http://francois.pignon.placard.fr"> francois pignon </a>
Avec XSLT je suppose (?)
<a>
<xsl:attribute name="href">
<xsl:text>http://</xsl:text>
<xsl:value-of select="prenom" />
<xsl:text>.</xsl:text>
<xsl:value-of select="nom" />
<xsl:text>.</xsl:text>
<xsl:value-of select="adresse" />
</xsl:attribute>
<xsl:value-of select="prenom" />
<xsl:text> </xsl:text>
<xsl:value-of select="nom" />
</a>
ou
<a>
<xsl:attribute name="href">
<xsl:value-of
select="concat('http://', prenom, '.', nom, '.', adresse)" />
</xsl:attribute>
<xsl:value-of select="concat(prenom, ' ', nom)" />
</a>
ou encore, avec des Attribute Value Templates:
<a href="http://{prenom}.{nom}.{adresse}">
<xsl:value-of select="prenom" />
<xsl:text> </xsl:text>
<xsl:value-of select="nom" />
</a>
et bien s�r toutes lescombinaisons possibles et imaginables...
Tom.
Technical Details
Message-ID:
<1114207.QgxmLvFx2q@ltgt.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!news1-2.free.fr!not-for-mailReferences:
<1005388896.919580@remus.infonie.fr>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,f66e508c03db4f0f X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-11-10 05:48:54 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!news1-2.free.fr!not-for-mail Message-ID: <1114207.QgxmLvFx2q@ltgt.net> From: Thomas Broyer <tbroyer@domain.tld.invalid> Subject: Re: a href : au secours Newsgroups: fr.comp.text.xml Reply-To: tbroyer-usenet@ltgt.net Mail-Copies-To: nobody Date: Sat, 10 Nov 2001 14:56:43 +0100 References: <1005388896.919580@remus.infonie.fr> Organization: </> User-Agent: KNode/0.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit Lines: 51 NNTP-Posting-Date: 10 Nov 2001 14:48:52 MET NNTP-Posting-Host: 80.11.37.132 X-Trace: 1005400132 news1-2.free.fr 32074 80.11.37.132 X-Complaints-To: abuse@proxad.net