Roland, I'm in the South of France right now on a business trip and can't really respond in detail to this. However, if you don't hear from one of the other developers, leave me a direct note and I will try and see if I can reproduce.
Keep in mind, the best venue for reporting bugs is bugzilla... http://nagoya.apache.org/bugzilla/ -scott Roland <roland@netquant. To: [EMAIL PROTECTED] com.br> cc: (bcc: Scott Boag/Cambridge/IBM) Subject: Xalan Bug: transform rubbish into gold 02/27/2002 06:09 PM Please respond to xalan-dev >Hello, >this seems to be a bug in Xalan(Java): >If I apply this stylesheet: > ><?xml version='1.0' encoding="iso-8859-1"?> ><xsl:stylesheet version="1.0" >xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >xmlns:fo="http://www.w3.org/1999/XSL/Format" >xmlns:svg="http://www.w3.org/2000/svg" >xmlns:fox="http://xml.apache.org/fop/extensions"> ><xsl:output method="xml" indent="yes"/> > ><xsl:template match="/doc"> ><xsl:variable name="tricky" select="current()/@name"/> > <xsl:message> > <xsl:value-of select="$tricky"/> > </xsl:message> > > <xsl:for-each select="//nasty"> > <xsl:message> > <xsl:value-of select="$tricky"/> > </xsl:message> > </xsl:for-each> ></xsl:template> ></xsl:stylesheet> > >to this xml file: > ><doc name='rubbish'> > <nasty name='gold'/> ></doc> > >You will see the output of Xalan turning rubbish into gold! >The problem is obviously in the current() function in this line: ><xsl:variable name="tricky" select="current()/@name"/> > >It seems to store the reference to a nodeset in the variable tricky >instead of the nodeset itself. If I change current() to the equivalent >"."(a dot) the example works as expected. > >Best regards, Roland >
