Subject: Re: [xsl] How to assign a sequence to a variable? From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx> Date: Tue, 9 Aug 2005 16:20:09 +0200 |
Hi David, yes, with both as="item()*" and <xsl:sequence it works fine. Thanks, Manfred On 8/9/05, David Carlisle <davidc@xxxxxxxxx> wrote: > > If you go > > <xsl:variable name="tempb"> > <xsl:value-of select="'b1','b2','b3'"/> > </xsl:variable> > > Then you generate a sequence of length 1 consisting of a document node, > this document node has a single text node child consisting of teh result > of applying value-of. > > So don't do that, either use a select attribute as in tempa or use as="item()*" > also (as in xslt1) xsl:value-of always generates a text node, and here > you want a sequence so use xsl:sequence instead: > > <xsl:variable name="tempb" as="item()*"> > <xsl:sequence select="'b1','b2','b3'"/> > </xsl:variable> > > same in teh call-template case: > > <xsl:message select="$tempb[1]"/> > <xsl:variable name="tempc" as="item()*"> > <xsl:call-template name="processName"> > </xsl:call-template> > </xsl:variable> > <xsl:message select="$tempc[1]"/> > </xsl:template> > <xsl:template name="processName"> > <xsl:sequence select="'c1','c2','c3'"/> > </xsl:template> > > David > > ________________________________________________________________________ > This e-mail has been scanned for all viruses by Star. The > service is powered by MessageLabs. For more information on a proactive > anti-virus service working around the clock, around the globe, visit: > http://www.star.net.uk > ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to assign a sequence , David Carlisle | Thread | [xsl] How to transform a huge XML-f, news |
Re: [xsl] Converting Word document , Jonas Lundberg | Date | Re: [xsl] getting java file paramet, Rahil |
Month |