Thomas, I just checked in a fix for this.  A very simple problem: if there
were no parameters being passed to the template, the variable slot wasn't
being nulled,
and so the default xsl:param wouldn't execute, and you would get the old
param value.

It's amazing this problem slipped by 1400 tests.  I've added a test that
will make sure this is regressed properly in the future.

Please refresh from the CVS, and give it another try.  I'll wait to hear
from you if this fixes the problem with your servlet.

-scott




                                                                                       
                              
                    Thomas2.Maesing                                                    
                              
                    @bgs-ag.de             To:     [EMAIL PROTECTED]            
                              
                                           cc:     (bcc: Scott Boag/CAM/Lotus)         
                              
                    06/26/2001             Subject:     Antwort: Re: Antwort: Re: 
Antwort: Re: Antwort: Re: Antwort: 
                    11:36 AM               Re: Antwort: [Bug 2124] - Status of 
SAXSource is changed in Xalan 2.1.0   
                    Please respond                                                     
                              
                    to xalan-dev                                                       
                              
                                                                                       
                              
                                                                                       
                              






Hi Scott,
it may that it is a problem with Expressions or Parameters because I found
a new very similar bug.

This is the template which does not work correct:

    <xsl:template match="xref">
<xsl:param name="idref" select="string(@xrefid)"/>
<a>
            <xsl:attribute name="href">#<xsl:value-of select="@xrefid"/>
            </xsl:attribute>
                <xsl:choose>
                <xsl:when test="string(@xidtype)=string('text')">Siehe
<xsl:value-of select="substring(//*[@id=$idref]//*[1],1,15)"/>...
&#160;</xsl:when>
                <xsl:when test="string(@xidtype)=string('table')">Tabelle
<xsl:value-of select="count(//*[@id=$idref]/preceding::table)
+1"/></xsl:when>
                <xsl:when test="string(@xidtype)=string
('figure')">Abbildung <xsl:value-of select="count(//*[@id
=$idref]/preceding::figure)
+1"/></xsl:when>
                <xsl:when test="string(@xidtype)=string('hspot')">Abb.
<xsl:value-of select="count(//*[@id=$idref]/preceding::figure)
+1"/></xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="@xidtype"/> <xsl:value-of select
="@xrefid"/>,</xsl:otherwise>
                </xsl:choose>
                <xsl:apply-templates select="@xrefitem"/>
        </a>


This following instruction returns always the same, the value of the first
occurence.

<xsl:when test="string(@xidtype)=string('hspot')">Abb. <xsl:value-of select
="count(//*[@id=$idref]/preceding::figure)+1"/></xsl:when>


I have attached an example. Please look at the links inside the results.
Xalan with STree returns the same as Saxon but I have canceled
it after two minutes because Saxon needs only one second.

Regards

Thomas

(See attached file: problem.zip)



Reply via email to