🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #9468

Re: Sortowanie elementow

#9468
From: TOUDIdel
Date: Wed, 29 Aug 2007 17:53
41 lines
2006 bytes
Użytkownik "Darek Pelka" <dariusz-pelka@go2.pl> napisał w wiadomości 
news:fb3q0s$c4j$1@news.onet.pl...
> Musze zrobic nastepujaca rzecz, chyba nic strasznie skomplikowanego, oto
> przyklad:
> Mam liste xml zawierajaca dane 30 plyt CD. Chce posortowac WSZYSTKIE 
> plyty,
> ale wyswietlic jednorazowo 10 plyt na strone, w zaleznosci od zmiennej
> PageNum. Jak to zrobic, aby posortowane zostalo wszystko, ale wyswietlilo
> sie tylko 10?
> W dotychczasowym rozwiazaniu najpierw wybieram 10 elementow i dopiero 
> potem
> moge je sortowac, a powinno byc odwrotnie, oto co mam:
> <xsl:for-each select="//selection[position() >= $from and position() &lt;
> $to]">
>   <xsl:sort select="price[7]/@show" data-type="number" order="ascending"/>
> </xsl:for-each>

<xsl:apply-templates select="selection">

    <xsl:sort select="@show" data-type="number"/>

</xsl:apply-templates>



<xsl:template match="selection">

    <xsl:if test="10 > position()">

        (...)

    </xsl:if>

</xsl:template>



-- 

td
Technical Details
Message-ID: <fb4bsi$md4$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <fb3q0s$c4j$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "TOUDIdel" <toudidel@oDWA.pl>
Newsgroups: pl.comp.xml
Subject: Re: Sortowanie elementow
Date: Wed, 29 Aug 2007 19:53:35 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 43
Message-ID: <fb4bsi$md4$1@atlantis.news.tpi.pl>
References: <fb3q0s$c4j$1@news.onet.pl>
NNTP-Posting-Host: aaig112.neoplus.adsl.tpnet.pl
X-Trace: atlantis.news.tpi.pl 1188410066 22948 83.4.214.112 (29 Aug 2007 17:54:26 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Wed, 29 Aug 2007 17:54:26 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Response
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit