Subject: Re: [xsl] joining nodes From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx> Date: Thu, 16 Feb 2006 15:56:59 +0000 |
should be transformed to the (text) output:
>v21n1 v11
n2
> v21 >v22
because n1 is associated to v11 and v21 and n2 is associated to v21 and v22 in <aaa/> and <bbb/> respectively.
n1 v11 v21 n2 v12 ** v22
because n1 is associated to v11 and v21 and n2 is associated to v12 and v22 in <aaa/> and <bbb/> respectively. See if there was a typo in your n2 values.
<xsl:for-each select="aaa/name"> <xsl:value-of select="."/> <xsl:value-of select="../value1"/> <xsl:value-of select="/join1/bbb/a[name=current()]/value2 </xsl:for-each>
<ccc> <a> <name>n1</name> <value2>v31</value2> </a> <a> <name>n2</name> <value2>v32</value2> </a> </ccc>
<xsl:for-each select="key('names',$name)"> <xsl:value-of select = "*[contains(name(),'value')]/text()"/> <br/> </xsl:for-each>
<hr/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
Try if this works. Vasu
From: David Carlisle <davidc@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] joining nodes Date: Thu, 16 Feb 2006 15:27:04 GMT
first one is just something like <xsl:for-each select="aaa/name"> : <xsl:value-of select="."/> : <xsl:value-of select="../value1"/> : <xsl:value-of select="/join1/bbb/a[name=current()]/value2 </xsl:for-each>
second one is something like
<xsl:for-each select="aaa/ident"> : <xsl:value-of select="."/> <xsl:text> </xsl:text> <xsl:value-of select="/join2/bbb/a[ident=current()]/subject </xsl:for-each>
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] joining nodes, David Carlisle | Thread | Re: [xsl] joining nodes, Rolf Schumacher |
RE: [xsl] joining nodes, Michael Kay | Date | Re: [xsl] Sudoku - A solution in XS, David Carlisle |
Month |