remove include
Posted: Thu Nov 09, 2006 1:15 pm
Hi,
I have a xml file (my main file) with includes. I want to remove those include lines and put the code of those include files into my main file. How can I do that with xslt?
Example:
Main file:
<definitions>
<types>
<schema>
<include file="includefile.xml"/>
</schema>
<z>
<x>XXX</x>
</z>
<y>
<x>XXX</x>
</y>
</types>
</definitions>
Include file:
<definitions>
<types>
<schema>
<a>AAA</a>
<b>BBB</b>
<c>CCC</c>
</schema>
</types>
</definitions>
Result:
<definitions>
<types>
<schema>
<a>AAA</a>
<b>BBB</b>
<c>CCC</c>
</schema>
<z>
<x>XXX</x>
</z>
<y>
<x>XXX</x>
</y>
</types>
</definitions>
I have a xml file (my main file) with includes. I want to remove those include lines and put the code of those include files into my main file. How can I do that with xslt?
Example:
Main file:
<definitions>
<types>
<schema>
<include file="includefile.xml"/>
</schema>
<z>
<x>XXX</x>
</z>
<y>
<x>XXX</x>
</y>
</types>
</definitions>
Include file:
<definitions>
<types>
<schema>
<a>AAA</a>
<b>BBB</b>
<c>CCC</c>
</schema>
</types>
</definitions>
Result:
<definitions>
<types>
<schema>
<a>AAA</a>
<b>BBB</b>
<c>CCC</c>
</schema>
<z>
<x>XXX</x>
</z>
<y>
<x>XXX</x>
</y>
</types>
</definitions>