Hi Alan, This should be fairly straightforward to accomplish. You'll need to set up your templates so that when you are processing <loc> elements, you do not copy <PDSCov> elements to the output. In your template for <lbLocs>, you could use an xsl:for-each to loop over the <lbloc>elements, recording the position() of each in a variable, and using it to fetch the corresponding <loc> element.
You should be able to find lots of XSLT resources online to help you out with this. Kevin Cormier Software Developer, XSLT Development IBM Toronto Lab, D1-435 E-mail: [EMAIL PROTECTED] "Alan Andrade" <[EMAIL PROTECTED] urity.com> To <xalan-j-users@xml.apache.org> 04/23/2007 06:38 cc PM Subject RE: can xalan transform 2 xml using one xslt? Here is my problem XML Input <root> <locs> <loc> <locno>1</locno> <bldno>1</bldno> <PDSCov> <PDSCLSCode>232323</PDSCLSCode> </PDSCov> </loc> <loc> <locno>1</locno> <bldno>2</bldno> <PDSCov> <PDSCLSCode>556456232323</PDSCLSCode> </PDSCov> </loc> </locs> <lbLocs> <lbloc> <locno>1</locno> <bldno>1</bldno> <Covs> <Cov> <CLSCode>2424434232323</CLSCode> </Cov> </Covs> </lbloc> <lbloc> <locno>1</locno> <bldno>2</bldno> <Covs> <Cov> <CLSCode>555555</CLSCode> </Cov> </Covs> </lbloc> </lbLocs> </root> Output XML <root> <locs> <loc> <locno>1</locno> <bldno>1</bldno> </loc> <loc> <locno>1</locno> <bldno>2</bldno> </loc> </locs> <lbLocs> <lbloc> <locno>1</locno> <bldno>1</bldno> <Covs> <Cov> <CLSCode>2424434232323</CLSCode> </Cov> <Cov> <CLSCode>232323</CLSCode> </Cov> </Covs> </lbloc> <lbloc> <locno>1</locno> <bldno>2</bldno> <Covs> <Cov> <CLSCode>555555</CLSCode> </Cov> <Cov> <CLSCode>556456232323</CLSCode> </Cov> </Covs> </lbloc> </lbLocs> </root> I need the nodes from one node moved into another. How do I do this? Thanks? Alan Alan Andrade | [EMAIL PROTECTED] The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. This message may be an attorney-client communication and/or work product and as such is privileged and confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. This message may be an attorney-client communication and/or work product and as such is privileged and confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.