Chris:

If that’s not an XSLT 1.0 feature then the attribute on xsl:stylesheet should not be 1.0. XSLT 1.1 will not go past Working draft. See if that works and let us know

Carlos



On 01/11/02 15:16, "Chris Meyer" <cmeyer@gatan.com> wrote:

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>




--
Carlos E. Araya
---+ WebCT Administrator/Trainer
 P | California Virtual Campus
 - | C/O De Anza College
 G | 21250 Stevens Creek Blvd
---+ Cupertino, CA 95014

email               carlos@cvc.edu
web                 http://www.cvc1.org/ (work)
                    http://www.silverwolf-net.net (personal)
phone               408 257 0420 (work)
PGP Fingerprint:    E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756

Paradoxically, a refusal to 'put a monetary value on life' means that life is often undervalued.
-- Artificial Intelligence: A Modern Approach