Page 1 of 1

nested XInclude

Posted: Tue Mar 15, 2005 9:42 pm
by dnbrown
I have a mutli-part document.. and have been using XInclude without a problem...

I am also able to transform each part/chapter/section without any errors..

I am now trying to break it up a little more and am attempting something like:

file1 = book include file2
file2 = include part (in file3 )
file3 = include chapter (in file4)

and I'm getting an error: Error attempting to parse XML file (href='xyz.abc.xml').

on the lowest level file. To me it seems to have something to do with the level of nesting of the XIncludes but I have been unable to confirm that. Again, I can validate each file separately without errors.

Any ideas?

Posted: Wed Mar 16, 2005 12:36 pm
by sorin_ristache
Hello,

I created, validated and transformed to PDF successfully a DocBook document with 6 levels of XInclude nesting. It seems that you don't use the DocBook DTD module for XInclude that comes with <oXygen/>. This is necessary because Xerces does not provide XInclude builtin support. To accomplish this you must declare and use a parameter entity with this module in the DOCTYPE declaration of each part of your document which includes another one with XInclude, like this:

Code: Select all


<!ENTITY % xinclude SYSTEM "../../frameworks/docbook/dtd/xinclude.mod" >
%xinclude;
You can see an example in samples/docbook/sampleXInclude.xml. Also you must enable XInclude processing in Preferences -> XML Parser Options.

If that doesn't work please send us samples of all your document parts to support at oxygenxml dot com.

Regards,
Sorin

Posted: Wed Mar 16, 2005 2:00 pm
by dnbrown
It works!!!

Thanks!!!!!