Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2007, 07:56 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default xslt help

my xml file are as followes File1.xml and File2.xml
I am comapring two files and want the output as output.xml cam u anybody help how to write the xsl file for it

File1.xml

<element>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>111</c>
    </child>
</element>


File2.xml

<element>
    <child>
       <Mangao>111</Mangao>
       <Appale>222</Appale>
       <orange>333</orange>
    </child>
</element>


Output.xml

<element>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>111</c>
       <d>222</d>
    </child>
</element>




 
Old May 10th, 2007, 08:17 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Could you explain a bit about the rules you are applying to decide what goes in the output? It's not easy to guess them!

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old May 10th, 2007, 08:33 AM
Registered User
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

from the

"a" "b "c" values in the File1.xml...i have to find the "d" value from the
File2.xml and creat the output.xml


it like

<element>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>111</c>
    </child>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>444</c>
    </child>
</element>


File2.xml

<element>
    <child>
       <Mangao>111</Mangao>
       <Appale>222</Appale>
       <orange>333</orange>
    </child>
     <child>
       <Mangao>444</Mangao>
       <Appale>555</Appale>
       <orange>666</orange>
    </child>
</element>


Output.xml

<element>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>111</c>
       <d>222</d>
    </child>
    <child>
       <a>Mango</a>
       <b>Appale</b>
       <c>444</c>
       <d>555</d>
    </child>
</element>









Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating XSLT with XSLT stonis XSLT 3 April 1st, 2008 08:17 PM
General XSLT Questions in the XSLT Forum jminatel BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 0 March 31st, 2008 07:50 PM
Can XSLT read DTD/schema and Generate XSLT.. ROCXY XSLT 1 November 6th, 2006 09:39 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
xslt with an xslt outputfile alleycat XSLT 4 February 20th, 2006 09:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.