[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] "Absurd" for XSLT... :o) (Was: Re: [xsl] when to use xslt)

Subject: [xsl] "Absurd" for XSLT... :o) (Was: Re: [xsl] when to use xslt)
From: Dimtre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 14 Jan 2005 19:03:44 +1100

> Obviously this suitability test can be stretched into something absurd,
> e.g.:
>        input:
>                <number-of-primes>6<number-of-primes>
>        output:
>                <primes>1,2,3,5,7,11</primes>
> Using XLST to do that computation would not be a great idea :-)...

Why do you think so?

See the XSLT solution of the Google's "Find the first sequence of 10
consecutive digits of e, which is a prime number"


The code is very compact and understandable, using such great XSLT 2.0
and Saxon features as xsl:function and the saxon:memo-function

The solution is amazingly fast and no doubt can be further improved.


Current Thread