I did some experimentation and the following XSLT file fails to work as expected also:

<?xml version='1.0'?>
 
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:saxon="http://icl.com/saxon"
    extension-element-prefixes="saxon">
 
    <!-- specify our output -->
    <xsl:output method="html" indent="yes"/>
    <xsl:strip-space elements="*"/>
 
    <xsl:template match="/">
        <xsl:for-each select="saxon:range(1,4)">
            <xsl:value-of select="/data/entry[position()=1]"/>
        </xsl:for-each>
        <xsl:for-each select="saxon:tokenize('a cup of tea')">
            <xsl:value-of select="/data/entry[position()=1]"/>
        </xsl:for-each>
    </xsl:template>
 
</xsl:stylesheet>

Notice that nothing is output with Saxon 6.5. I would expect some text to be output.

This problem looks like the extensions that produce node sets and are implemented using the doc.getEnumeration(...) functions manage to hide the document somehow.

Am I missing something or is this a bug?

At 2:02 PM -0800 1/11/02, Chris Meyer wrote:
Hi,
 
I am trying to use the saxon extension saxon:range to iterate over a list of nodes. I would expect the output of the xslt file below to be the list of names in my input file. Can anyone see what I'm doing wrong?
 
Thanks,
Chris
 
The example XML file is:
 
<data>
    <entry name="fred">Fred</entry>
    <entry name="joe">Joe</entry>
    <entry name="steve">Steve</entry>
    <entry name="rob">Rob</entry>
</data>
and the example XSLT file is:
 
<?xml version='1.0'?>
 
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:saxon="http://icl.com/saxon"
    extension-element-prefixes="saxon">
 
    <!-- specify our output -->
    <xsl:output method="html" indent="yes"/>
    <xsl:strip-space elements="*"/>
 
    <xsl:template match="/">
        <xsl:for-each select="saxon:range(1,4)"> <!-- if I make select="data/entry" it outputs what I want -->
            <xsl:variable name="pos" select="position()"/>
            <b><xsl:value-of select="/data/entry[position()=$pos]"/></b>
        </xsl:for-each>
    </xsl:template>
 
</xsl:stylesheet>