These sorts of general XSLT questions are better posted on the Mulbery XSL
list, not the Xalan-specific developer list.  Please subscribe and post
such questions there:

   http://www.mulberrytech.com/xsl/

You are trying to use an XSLT processor with a stylesheet written in the
old working draft language.  This obsolete language is supported only by
older versions of the Microsoft processor.  It is _not_ supported by Xalan.
And this doesn't even look like a Xalan error message.  Are you really
using the Xalan processor?  It looks as though you're using the old
Microsoft processor, which makes this question even more inappropriate for
the Xalan list.

If you're really using Xalan, then do the following:

Change:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>

to:

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

You should get a good book on XSLT and learn the real XSLT, not this
obsolete dialect.  And upgrade your version of MSXML to the version that
supports XSLT.

Dave



                                                                                       
                  
                      "Cook, Jim                                                       
                  
                      x66261"                  To:      [EMAIL PROTECTED]       
                  
                      <[EMAIL PROTECTED]         cc:      (bcc: David N 
Bertoni/CAM/Lotus)                 
                      om>                      Subject: using count()                  
                  
                                                                                       
                  
                      10/23/2001 08:50                                                 
                  
                      PM                                                               
                  
                      Please respond                                                   
                  
                      to xalan-dev                                                     
                  
                                                                                       
                  
                                                                                       
                  



We are trying to get the count() function to work properly.  The following
code gives us an "Unknown method.


-->count(.<--)" error message.  Our XML & XSL files are shown below.


Any ideas
TIA Jim Cook


XML


<?xml version="1.0"?>
<permissions>
        <product>
                <name >TEST1</name>
                <entitled>1</entitled>
                <title>Tools</title>
                <function>
                        <name sequence="2">item1</name>
                        <entitled>1</entitled>
                        <allowed>1</allowed>
                        <subtitle>First Item</subtitle>
                </function>
                <function>
                        <name sequence="2">item2</name>
                        <entitled>1</entitled>
                        <allowed>1</allowed>
                        <subtitle>Second Item</subtitle>
                </function>
        </product>
</permissions>





XSL


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
        <xsl:template match="/">
        <html>
                <body>
                <xsl:apply-templates select="/*/product" />
                </body>
        </html>
        </xsl:template>


        <xsl:template match="product">
                <xsl:value-of select="count(.)" />
        </xsl:template>
</xsl:stylesheet>







Reply via email to