🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: tri dans les xsl

#10668
From: Thierry Bezecourt
Date: Fri, 25 Aug 2000 00:00
43 lines
1856 bytes
In article <37rp5.3609$1P3.4709482@nnrp6.proxad.net>,
  "Freeze" <freeze@pole.nord> wrote:
>         </rubrique>
> <une_fiche numero="2">

Le tag fermant </une_fiche> manque. Attention au copi�/coll� !

>            <xsl:sort select=".[@nom]"/>

Ceci n'est pas une expression XPath correcte.

> Je voudrais donc que les fiches soient tri�es par la cl� suivante
> : attribut nom de nom_type.

Essaie ceci avec Xalan :

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'>

<xsl:template match="fiches">
   <xsl:for-each select='une_fiche'>
     <xsl:sort select="titre/nom_type/@nom"/>
     Fiche <xsl:value-of select='@numero' />
     Type : <xsl:value-of select='titre/nom_type/@nom' />
   </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

> Je pr�cise que j'ai pas fait tout �a au hasard : j'ai un bouquin
> et des tutoriaux en ligne. De plus j'ai essay� pas mal de
> combinaison sur la cl� de tri.

Les specs de XSLT et XPath, et un peu d'exp�rimentation, �a marche pas
mal.

--
Thierry B�zecourt


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8o5mua$b20$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37rp5.3609$1P3.4709482@nnrp6.proxad.net>

Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII
X-Google-Thread: 114f60,fee48b56a7e00f31
X-Google-Attributes: gid114f60,public
From: Thierry Bezecourt <thbz@thbz.cx>
Subject: Re: tri dans les xsl
Date: 2000/08/25
Message-ID: <8o5mua$b20$1@nnrp1.deja.com>
X-Deja-AN: 662326375
References: <37rp5.3609$1P3.4709482@nnrp6.proxad.net>
X-Http-Proxy: 1.0 srv66.globeid.com:8080 (Squid/2.3.STABLE1), 1.0 x52.deja.com:80 (Squid/1.1.22) for client unknown, 213.41.26.66
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Fri Aug 25 11:57:04 2000 GMT
X-MyDeja-Info: XMYDJUIDthrubis
Newsgroups: fr.comp.text.xml
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)