"Diodak" <di*****@poczta.onet.pl> wrote in message
news:c5**********@news.onet.pl...
Thank's but this solution not exacly what i want.
I want display only one from recordcount and that one mast be
integer and random. Maybe my english is to poor to explain that.
//part of xml file
<galeria>
<foto>
<min>1m.jpg</min>
<max>1.jpg</max>
<data>2004.04.04</data>
<autor>Marcin</autor>
<kat>Przyroda</kat>
</foto>
<foto>
<min>2m.jpg</min>
<max>2.jpg</max>
<data>2004.03.08</data>
<autor>Anna</autor>
<kat>Krajobraz</kat>
</foto>
............
</galeria>
I want display random node 'foto'
How i can do that?
Please give me hint or part of source xsl file
In the quoted article there is an example with source code
(test1-random.xsl) of generating 100 randoms in the range [1, 10].
Use the same code to generate one (or whatever number of randoms you need)
random in the range [1, count(/galeria/foto)]. Let's have this random in a
xsl:variable named $theRand.
Then your random node is:
/galeria/foto[$theRand]
Cheers,
Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,
http://fxsl.sourceforge.net/ -- the home of FXSL
Resume:
http://fxsl.sf.net/DNovatchev/Resume/Res.html