Link to home
Start Free TrialLog in
Avatar of ethar turky
ethar turkyFlag for Saudi Arabia

asked on

random xsl select

Hi,
How to select random 5 news using xsl from xml file

thanks
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

That is pretty tricky

There is EXSLT supported by some XSLT1 processors, you can call in C#code or JScript code in some other processors or you can pass in a random number as a parameter

Before we can pursue this, I would like to know which XSLT processor you are using
as you can see here
http://www.exslt.org/math/functions/random/index.html
only a few processors support math:random
Avatar of ethar turky

ASKER

how can use : math:random()

also how can know the processor, I use Microsoft ( if that what do u means )
Ah OK,
I mean the XSLT processor
How do you run the XSLTs, from C#?
use asp Set oXSL = Server.CreateObject("Msxml2.DOMDocument.3.0")
ah OK, that means you are using msxml and XSLT1
I can work with that, hang on
is there is a better option?
is there is a better option?  XSLT2 or something?
XSLT2 has a number of benefits, but integration in ASP is still a bit tricky
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thnx , work like charm