I'm afraid I don't understand.
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:param name="ItemsPerPage" select="20"/> are just typos in my original post - even when they are set the problem still occurs.
I thought with an XSL fragment (server side) you get the XSL you want, do a XSL transform and this gives you the results of the XSL on a PHP page, say. Why do I have to set a JavaScript variable in the XSL fragment and not from the PHP output?
My code works when you use <?php echo $foo;?> in the script but not
<?php echo $earth;?>, i.e. not with the result of the transform.
Any more help much appreciated.
J