Yep, that would be because '+' is only meant for numeric addition. Since two of the operands are not numbers, you get NaN (IIC, short for Not a Number...)
Cheers, Andreas > -----Original Message----- > From: Johannes Franz [mailto:[EMAIL PROTECTED] > Sent: donderdag 14 oktober 2004 19:42 > To: [EMAIL PROTECTED] > Subject: Re: Question concerning Xalan. > > > Hi Clay, > when i try your way i don't get error messages. But only one file > is created > with the name NaN. > ----- Original Message ----- > From: "Clay Leeds" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 14, 2004 7:34 PM > Subject: Re: Question concerning Xalan. > > > > On Oct 14, 2004, at 10:18 AM, Johannes Franz wrote: > >> Sorry but i am really a newbie: > >> When i try your example i get the following error message: > >> > >> <xsl:template match="/doc/foo"> > >> <redirect:write select="'foo' &position() &'.html'"> > > > > I think that should be: > > > > <redirect:write select="'foo' + position() + '.html'"> > > > >> <foo-out> > >> <xsl:apply-templates/> > >> </foo-out> > >> </redirect:write> > >> </xsl:template> > >> > >> java -cp xalan-2.4.1.jar;xerces-1.2.3.jar > >> org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT > >> Redirect.html -HTML > >> [Fatal Error] Redirect.xsl:20:44: The reference to entity > "position" must > >> end with the ';' delimiter. > >> > >> Redirect.xsl; Line #20; Column #44; XSLT Error > >> (javax.xml.transform.TransformerConfigurationException): > >> javax.xml.transform.TransformerException: > org.xml.sax.SAXParseException: > >> The reference to entity "position" must end with the ';' delimiter. > >> > >> > >> ----- Original Message ----- From: "Jeremias Maerki" > >> <[EMAIL PROTECTED]> > >> To: <[EMAIL PROTECTED]> > >> Sent: Thursday, October 14, 2004 6:00 PM > >> Subject: Re: Question concerning Xalan. > >> > >> > >>> Something like that maybe? > >>> > >>> <xsl:template match="/doc/foo"> > >>> <redirect:write select="'foo' & position() & '.html'"> > >>> <foo-out> > >>> <xsl:apply-templates/> > >>> </foo-out> > >>> </redirect:write> > >>> </xsl:template> > >>> > >>> On 14.10.2004 17:18:25 Johannes Franz wrote: > >>>> Hi, > >>>> > >>>> yeah this is exactly what i needed. But could you please > help me with > >>>> the > >>>> following problem? > >>>> I would like to write to write every childnote to a new > file. If there > >>>> are 4 > >>>> Childnodes doc/foo > >>>> he should write every childnote to one file: foo1.html foo2.html > >>>> foo3.html > >>>> foo4.html. Could someone give me example how to realize this? > >>>> > >>>> <xsl:template match="/doc/foo"> > >>>> <redirect:write select="@file"> > >>>> <foo-out> > >>>> <xsl:apply-templates/> > >>>> </foo-out> > >>>> </redirect:write> > >>>> </xsl:template> > >>> > >>> > >>> Jeremias Maerki > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > Web Maestro Clay > > -- > > Clay Leeds - <[EMAIL PROTECTED]> > > Webmaster/Developer - Medata, Inc. - <http://www.medata.com/> > > PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]