Subject: [xsl] How to copy the previous operations? From: Ram <sram_30@xxxxxxxxx> Date: Wed, 19 Nov 2003 08:21:57 -0800 (PST) |
Hi, Can anyone help me out how to copy the previous operations? The xml source would look like this: <formatted-xml> <group><identifier>a</identifier> <signature>signature <identifier>DNSQuery1</identifier> <in>in<long>long</long><identifier>ant</identifier></in> </signature> </group> <group><identifier>b</identifier><identifier>a</identifier> <signature>signature<identifier>DNSQuery2</identifier> <inout>inout<string>string</string><identifier>grass</identifier></inout> </signature> </group> <group><identifier>c</identifier><identifier>b</identifier> <signature>signature<identifier>DNSQuery3</identifier> <out>out<boolean>boolean</boolean> <identifier>fish</identifier></out> </signature> </group> </formatted-xml> What I have to do is, I should copy the signature part the first group identifier 'a' to the signature part in group identifier 'b', because it is followed by the group identifier 'a'. Similarly, the third group identifier 'c' is followed by the second group identifier 'b' (which should have already copied the first group identifier a's signature part) and so the second group identifier's signature part should be copied to the third group identifier signature part. I tried the following xsl. <xsl:template match="group"> <xsl:if test="identifier[2]= preceding::group/identifier"> <xsl:copy> <xsl:apply-templates select="preceding::group/signature"/> </xsl:copy> </xsl:if> </xsl:template> But it didn't work. Thanks and regards, Ram __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xpath problem, Aananth.S | Thread | RE: [xsl] xpath problem, cknell |
RE: [xsl] XSL Tool, kakridge | Date | RE: [xsl] xpath problem, cknell |
Month |