Hello, Can I import code from other xml files using XSLT. For example I have two files A.xml,B.xml. Now I would like to modify(include) A.xml with code that is present in B.xml. How can I achieve it using an xsl?? If I define templates, then I would have to copy the code present in B.xml into my template. But I dont wanna do this. Is there any way so that I can just modify one file with another using an XSL without duplicating code. shankar,
Balaji and Roseanne, Thanx for the replies. I went thru the links you mentioned.But i am not sure whether they would solve my problem.I need to just include an xml file(alongwith tags) in another xml file thereby producing a (bigger) output xml.Example: source file <root> <include> <file>inc.xml</file> </include> </root> inc.xml <firm> <employee> <name>XYZ</name> <age>21</age> </employee> </firm> output file <root> <name>XYZ</name> <age>21</age> </root> So,I want to pick some tags from an xml file and add(include) them in another.But in the examples mentioned in the urls, the content of xml files are being merged to produce an html output.Am I missing something here??? Shankar.
Joined: Nov 14, 2000
The first part of my xslt code is more than sufficient to solve your problem. You don't even need the extention. However, you do need to write a few lines of code, copying will not work. Balaji's link is very specific to your question, however, you still need to read them, and digest. Then you need to apply what you learned from there, and write a few lines of your own code.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com