XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
(Deleted User) Subject: Faire un trie selon un nœud en XSLT
Author: (Deleted User)
Date: 22 Mar 2006 10:51 AM
Bonjour,
j'ai le XML sui a la skolette suivante:
<searchs>
<search>
<username>..................</username>
<keywords>
<keyword>....</keyword>
<keyword>....</keyword>
.
.
.
</keywords>
</search>
.
.
.
</searchs>
j'ai fait un XSLT qui me permet d'afficher un tableau en html qui continet pour chaque recherche une ligne contenant un utilisateur et ses keywods
je voulais trier ces resultats en fontion de la longeur de ces keywords(combient de noeuf fils direct elle contient
<xsl:template match="searchs">
<xsl:for-each select="search">
<xsl:sort select="compteur_key" type-data="nomber" order="descending"/>
<tr>
<td><xsl:value-of select="username"/></td>
<xsl:variable name="compteur_key" select="count(keywords/keyword")"/>
<td><xsl:apply-templates select="keywords/keyword"/></td>
</xsl:for-each>
.
.
.
</xsl:template>

le trie ne fonctionne pas SVP aidez moi c'est tres urgent
merci d'avance


DocumentNoname(18).

Postnext
Minollo I.Subject: Faire un trie selon un nœud en XSLT
Author: Minollo I.
Date: 22 Mar 2006 11:40 AM
I guess you should change your for loop to:

<xsl:template match="searchs">
<xsl:for-each select="search">
<xsl:sort select="count(keywords/keyword)" data-type="number" order="descending"/>
<tr>
<td><xsl:value-of select="username"/></td>
<td><xsl:apply-templates select="keywords/keyword"/></td>
</xsl:for-each>

...but I'm not sure my poor understanding of French is helping me here...
Minollo

Posttop
(Deleted User) Subject: Re: Faire un trie selon un nud en XSLT
Author: (Deleted User)
Date: 22 Mar 2006 12:33 PM
think you a lot Minollo
yes its true now
bye bye
Selon stylus-studio-xslt Listmanager
:

> From: Minollo I.
>
> I guess you should change your for loop to:
>
> <xsl:template match="searchs">
> <xsl:for-each select="search">
> <xsl:sort select="count(keywords/keyword)" data-type="number"
> order="descending"/>
> <tr>
> <td><xsl:value-of select="username"/></td>
> <td><xsl:apply-templates select="keywords/keyword"/></td>
> </xsl:for-each>
>
> ...but I'm not sure my poor understanding of French is helping me here...
> Minollo
>
>
> --
> To reply: mailto:stylus-studio-xslt.14354@stylusstudio.com
> To start a new topic: mailto:stylus-studio-xslt@stylusstudio.com
> To login: http://www.stylusstudio.com/SSDN/
> To (un)subscribe: mailto:stylus-studio-xslt.list-request@stylusstudio.com
>
>


--
Sonia LAJMI
Master recherche informatique
INSA de Lyon
Batiment Blaise Pascal
tel.:04 37 48 18 71
Por.:06 19 83 36 02

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.