Trying to help out a friend here... There is some output generated by an external tool that outputs xml nodes into a file. He needs to make this xml well-formed and apply a xsl stylesheet on it.
So we have b.xml (generated by the tool) and Encomp.xml that imports the contents of b.xml as an XML external entity like this (Create 3 xml files in the same folder if you want to try this out)
Encomp.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document [ <!ENTITY data SYSTEM 'b.xml'>]>
<Root-Element xmlns:log="http://log4net.sourceforge.net/">
&data;
</Root-Element>
b.xml
<log:MyNode Name="Node1"/>
<log:MyNode Name="Node2"/>
<log:MyNode Name="Node3"/>
a.xml
<MyNode Name="Node1"/>
<MyNode Name="Node2"/>
Now the problem is that this approach works with content like a.xml (where the nodes are not qualified with a namespace) but doesn't work for b.xml.
My guess is that maybe the namespace is undefined at DOCTYPE line, it is only declared on the next line. How do I get this to work?