Actually, I've done this sort of thing before. You need to create a callable template and call it recursively. It can be done, but it's not for the faint-of-heart...
-----Original Message----- From: Henry Zongaro [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 11:03 AM To: [EMAIL PROTECTED] Cc: [email protected] Subject: Re: Xalan ignores DocumentFragment returned by extension function Hi, Uwe. [EMAIL PROTECTED] wrote on 2006-01-06 12:58:00 PM: > Input fragment: > <floatlist>0 1 2 3 4 5 6 7 8</floatlist> > > Output fragment: > <vec3 value="0 1 2"/> > <vec3 value="3 4 5"/> > <vec3 value="6 7 8"/> > > As to my knowledge there is no way to get this working in XSLT directly It might be slightly complicated, but not impossible - but who knows with the additional processing you mention below. > (and because for the project behind it there is some more processing > required than shown above anyway), I wrote an extension function to do > this, and invoke it with this XSL fragment: > > <xsl:for-each select="floatlist"> > <xsl:value-of value="ext:makevec3s(.)"/> > </xsl:for-each> The xsl:value-of will print the string value of the first node in the node set returned by ext:makevec3s(.), which is an empty string in this case. I think you really want something like this, which worked for me: <xsl:for-each select="ext:makevec3s(.)/vec3"> <xsl:value-of select="@value"/> </xsl:for-each> Thanks, Henry ------------------------------------------------------------------ Henry Zongaro Xalan development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:[EMAIL PROTECTED]
