Hi, Try:
<redirect:write select="concat('foo',position(),'.html')"> ... Dunno for sure, but could even be that it needs the curly braces for an AVT, like so: <redirect:write select="{concat('foo'...)}"> One thing's for sure: ampersands definitely can't be used for string concatenation in XSLT. Cheers, Andreas > -----Original Message----- > From: Johannes Franz [mailto:[EMAIL PROTECTED] > Sent: donderdag 14 oktober 2004 19:18 > To: [EMAIL PROTECTED] > Subject: Re: Question concerning Xalan. > > > 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'"> > <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] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]