Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Copy an element of a file A to a file B >Thread Next - Re: Copy an element of a file A to a file B Re: Copy an element of a file A to a file BTo: NULL Date: 9/5/2006 2:18:00 PM Dani Meier wrote: > How can I select an element (with all sub-elements) of a file A and > copy it to another file B (without any transformation). XSLT operates one one primary XML input and then can use the XSLT document function <http://www.w3.org/TR/xslt#document> to read in other XML documents if needed. So assuming you have a stylesheet processing file B you can use e.g. <xsl:copy-of select="document('fileA.xml')/root-element-name/child-element/element-to-copy" /> at that place in the stylesheet where you want to insert the element from fileA.xml. Obviously the XPath expression is just an example, what you need exactly after document('fileA.xml')/ depends on the structure of that document. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
