J
john fra
Hi,
I want to include a part of many XML files into an unique XML file with
XInclude.
Example!
File1.xml, File2.xml, File3.xml... seems to that :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>
I want to extract this bloc from each files :
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
I want to create ONE unique file like this file :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>
To do that i've inserted xinclude like that but it doesn't work :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<xi:include href="File1.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
<xi:include href="File2.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
<xi:include href="File3.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
</group1>
</doc>
What's wrong ?
Any help would be greatly appreciated.
regards
Mike
I want to include a part of many XML files into an unique XML file with
XInclude.
Example!
File1.xml, File2.xml, File3.xml... seems to that :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>
I want to extract this bloc from each files :
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
I want to create ONE unique file like this file :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
<b1>
<b11>lalala</b11>
<b12>lilili</b12>
</b1>
</group1>
</doc>
To do that i've inserted xinclude like that but it doesn't work :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="doc.xsl" type="text/xsl"?>
<!DOCTYPE doc []>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:noNamespaceSchemaLocation="doc.xsd">
<group1>
<xi:include href="File1.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
<xi:include href="File2.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
<xi:include href="File3.xml" xpointer="group1">
<xi:fallback>NotFoundError</xi:fallback>
</xi:include>
</group1>
</doc>
What's wrong ?
Any help would be greatly appreciated.
regards
Mike